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.
This commit is contained in:
Jorropo
2025-07-29 23:37:54 +02:00
committed by GitHub
parent 89f285eb80
commit a5facaed4f

View File

@@ -1,9 +1,6 @@
// Type your code here, or load an example.
// Your function name should start with a capital letter.
package main
package p
func Square(x int) int {
func square(x int) int {
return x * x
}
func main() {}