Files
compiler-explorer/examples/go/default.go
Jorropo a5facaed4f Simplify default.go (#7963)
A while ago compiler explorer would only see exported functions of the
main package (and the main function).
I don't know when but at someone improved the flags passed to the go
compiler and it now sees all functions, even if you use the oldest go
compiler still supported.

Remove noise from the example and make it more like the C one.
2025-07-29 16:37:54 -05:00

7 lines
99 B
Go

// Type your code here, or load an example.
package p
func square(x int) int {
return x * x
}