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
// 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
Download from the command line
curl -L -o sample-10000-lines.go https://files.samplefiles.com/code/go/sample-10000-lines.gowget https://files.samplefiles.com/code/go/sample-10000-lines.gohttps://files.samplefiles.com/code/go/sample-10000-lines.goprintf '%s %s\n' 4e4d7a78acdcfedcc3402a7b67552459b5c6d1bf86d34a888d58240590900fdc sample-10000-lines.go | shasum -a 256 -cOr 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
| File | Size | Details | Download |
|---|---|---|---|
| Sample Go filemain.go | 631 B | Download |