Imports #
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"fmt"
"reflect"
"strings"
"internal/goexperiment"
"runtime"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"fmt"
"reflect"
"strings"
"internal/goexperiment"
"runtime"
const DefaultGO386 = `sse2`const DefaultGOAMD64 = `v1`const DefaultGOARM = `7`const DefaultGOARM64 = `v8.0`DefaultGOEXPERIMENT is the embedded default GOEXPERIMENT string. It is not guaranteed to be canonical.
const DefaultGOEXPERIMENT = defaultGOEXPERIMENTconst DefaultGOFIPS140 = `off`const DefaultGOMIPS = `hardfloat`const DefaultGOMIPS64 = `hardfloat`const DefaultGOPPC64 = `power8`const DefaultGORISCV64 = `rva20u64`Error is one of the errors found (if any) in the build configuration.
var Error errorExperiment contains the toolchain experiments enabled for the current build. (This is not necessarily the set of experiments the compiler itself was built with.) experimentBaseline specifies the experiment flags that are enabled by default in the current toolchain. This is, in effect, the "control" configuration and any variation from this is an experiment.
var Experiment ExperimentFlags = *ast.CallExprFramePointerEnabled enables the use of platform conventions for saving frame pointers. This used to be an experiment, but now it's always enabled on platforms that support it. Note: must agree with runtime.framepointer_enabled.
var FramePointerEnabled = *ast.BinaryExprvar GO386 = *ast.CallExprvar GOAMD64 = *ast.CallExprvar GOARCH = *ast.CallExprvar GOARM = *ast.CallExprvar GOARM64 = *ast.CallExprvar GOFIPS140 = *ast.CallExprvar GOMIPS = *ast.CallExprvar GOMIPS64 = *ast.CallExprvar GOOS = *ast.CallExprvar GOPPC64 = *ast.CallExprvar GORISCV64 = *ast.CallExprvar GOROOT = *ast.CallExprvar GOWASM = *ast.CallExprvar GO_LDSO = defaultGO_LDSOvar ToolTags = *ast.CallExprvar Version = versionconst defaultGOARCH = runtime.GOARCHconst defaultGOEXPERIMENT = ``const defaultGOOS = runtime.GOOSconst defaultGO_EXTLINK_ENABLED = ``const defaultGO_LDSO = ``const version = `go1.24.5`ExperimentFlags represents a set of GOEXPERIMENT flags relative to a baseline (platform-default) experiment configuration.
type ExperimentFlags struct {
goexperiment.Flags
baseline goexperiment.Flags
}type Goarm64Features struct {
Version string
LSE bool
Crypto bool
}type GoarmFeatures struct {
Version int
SoftFloat bool
}type gowasmFeatures struct {
SatConv bool
SignExt bool
}All returns a list of all experiment settings. Disabled experiments appear in the list prefixed by "no".
func (exp *ExperimentFlags) All() []stringCheck exits the program with a fatal error if Error is non-nil.
func Check()Enabled returns a list of enabled experiments, as lower-cased experiment names.
func (exp *ExperimentFlags) Enabled() []stringGOGOARCH returns the name and value of the GO$GOARCH setting. For example, if GOARCH is "amd64" it might return "GOAMD64", "v2".
func GOGOARCH() (name string, value string)func Getgoextlinkenabled() stringParseGOEXPERIMENT parses a (GOOS, GOARCH, GOEXPERIMENT) configuration tuple and returns the enabled and baseline experiment flag sets. TODO(mdempsky): Move to internal/goexperiment.
func ParseGOEXPERIMENT(goos string, goarch string, goexp string) (*ExperimentFlags, error)func ParseGoarm64(v string) (g Goarm64Features, e error)func (g GoarmFeatures) String() stringfunc (g Goarm64Features) String() stringString returns the canonical GOEXPERIMENT string to enable this experiment configuration. (Experiments in the same state as in the baseline are elided.)
func (exp *ExperimentFlags) String() stringfunc (f gowasmFeatures) String() stringReturns true if g supports giving ARM64 ISA Note that this function doesn't accept / test suffixes (like ",lse" or ",crypto")
func (g Goarm64Features) Supports(s string) boolfunc envOr(key string, value string) stringexpList returns the list of lower-cased experiment names for experiments that differ from base. base may be nil to indicate no experiments. If all is true, then include all experiment flags, regardless of base.
func expList(exp *goexperiment.Flags, base *goexperiment.Flags, all bool) []stringfunc experimentTags() []stringfunc goamd64() intfunc goarm() (g GoarmFeatures)func goarm64() (g Goarm64Features)func gofips140() stringfunc gogoarchTags() []stringfunc gomips() stringfunc gomips64() stringfunc goppc64() intfunc goriscv64() intfunc gowasm() (f gowasmFeatures)isFIPSVersion reports whether v is a valid FIPS version, of the form vX.Y.Z.
func isFIPSVersion(v string) boolskipNum skips the leading text matching [0-9]+ in s, returning the rest and whether such text was found.
func skipNum(s string) (rest string, ok bool)func toolTags() []stringGenerated with Arrow