The Go Playground

https://play.golang.org/p/LxeQX8GMZjq

The Go Playground Imports embed Hello, playground Tests Multiple files Display image Sleep Clear package main import ( "fmt" ) func g() int { fmt.Println("g()") return 0 } func f(int) { fmt.Println("f()") } func main() { defer f(g()) fmt.Println("Hello world!") } About the Playground The Go Playground is a web service that runs on golang.org 's servers. The service receives a Go program, vets , compiles, links, and runs the program inside a sandbox, then returns the output. If the program contains tests or examples and no main function, the service runs the tests. Benchmarks will likely not be supported since the program runs in a sandboxed environment with limited resources. There are limitations to the programs that can be run in the playground: The playground can use most of the standard library, with some exceptions. The...

Linked on 2020-12-08 23:44:20 | Similar Links