Standard library / go/build

go/build.Default

Default build context initialized from the running environment; copy before customization. Expected stdout: 'true true\n'.

Formal Syntax & Structure

go syntaxgo
var Default Context

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/build")
func main() { c := build.Default; fmt.Println(c.GOOS != "", c.GOARCH != "") }
Go Reference