Go runtime

The support code the compiler builds into every Go program, which schedules goroutines, manages memory and collects garbage.

In more detail

Other languages often need a runtime installed on the machine; Go links it into the binary, so there is nothing extra to install. The runtime package lets a program ask about it, for example runtime.GOOS and runtime.GOARCH report the platform the binary was built for.

Example

fmt.Println(runtime.GOOS, runtime.GOARCH)

Related terms

Taught in

References