var goflags … // GOFLAGS returns the flags from $GOFLAGS. // The list can be assumed to contain one string per flag, // with each string either beginning with -name or --name. func GOFLAGS() []string { … } // InitGOFLAGS initializes the goflags list from $GOFLAGS. // If goflags is already initialized, it does nothing. func InitGOFLAGS() { … } type boolFlag … // SetFromGOFLAGS sets the flags in the given flag set using settings in $GOFLAGS. func SetFromGOFLAGS(flags *flag.FlagSet) { … } // InGOFLAGS returns whether GOFLAGS contains the given flag, such as "-mod". func InGOFLAGS(flag string) bool { … }