Go · 167 KB

Large Go file (about 10,000 lines)

1,110 generated functions in about 10,000 lines of valid Go, for testing editors, syntax highlighters, linters and diff tools with big files.

CC0 · free for any use · Verified by an independent tool · Report a problem

sample-10000-lines.go — first linesGo
// Generated 10,000-line Go file — samplefiles.com
package large

func Compute0(values []float64) float64 {
	// Scaled sum for batch 0
	total := 0.0
	for _, v := range values {
		total += v * 0
	}
	return total
}

func Compute1(values []float64) float64 {
	// Scaled sum for batch 1
	total := 0.0
	for _, v := range values {
		total += v * 1
	}
	return total
}

func Compute2(values []float64) float64 {
	// Scaled sum for batch 2
	total := 0.0
	for _, v := range values {

File details

Size
167 KB (171,008 bytes)
MIME type
text/x-go
Lines
9,993
SHA-256
4e4d7a78acdcfedcc3402a7b67552459b5c6d1bf86d34a888d58240590900fdc
MD5
30bfa9d9a1b49a64651c08b349c9eb08

Download from the command line

curl -L -o sample-10000-lines.go https://files.samplefiles.com/code/go/sample-10000-lines.go

Or check the download in your browser with the checksum calculator.

Same sample in other formats

Python · 213 KBJavaScript · 205 KBJava · 264 KBC · 268 KBRust · 250 KB

Similar Go files

FileSizeDetailsDownload
Sample Go filemain.go631 BDownload