Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadMod(ctx context.Context, args ...string) *exec.Cmd
- type ArchExtra
- type ArchExtraValue
- type BuildCommand
- func (c BuildCommand) Exec() *exec.Cmd
- func (c BuildCommand) ExecContext(ctx context.Context) *exec.Cmd
- func (c BuildCommand) Ldflags(value string) BuildCommand
- func (c BuildCommand) OutputName(name string) BuildCommand
- func (c BuildCommand) ProductionLdflags() BuildCommand
- func (c BuildCommand) Run() ([]byte, error)
- func (c BuildCommand) TrimPath() BuildCommand
Constants ¶
View Source
const ( HardFloat = "hardfloat" SoftFloat = "softfloat" )
Variables ¶
View Source
var ExtraArches = map[string][]ArchExtra{ "arm": { { EnvKey: "GOARM", Values: []ArchExtraValue{ {Value: "5", Name: "v5", ExtraFloat: HardFloat, IsDefault: true}, {Value: "6", Name: "v6", ExtraFloat: SoftFloat}, {Value: "7", Name: "v7", ExtraFloat: SoftFloat}, }, }, }, "arm64": { { EnvKey: "GOARM64", Values: []ArchExtraValue{ {Value: "v8.0", Name: "v8", IsDefault: true}, {Value: "v9.0", Name: "v9"}, }, }, }, "386": { { EnvKey: "GO386", Values: []ArchExtraValue{ {Value: "sse2", IsDefault: true}, {Value: SoftFloat}, }, }, }, "amd64": { { EnvKey: "GOAMD64", Values: []ArchExtraValue{ {Value: "v1", IsDefault: true}, {Value: "v2"}, {Value: "v3"}, {Value: "v4"}, }, }, }, "wasm": { { EnvKey: "GOWASM", Values: []ArchExtraValue{ {Value: "", IsDefault: true}, {Value: "satconv"}, {Value: "signext"}, }, }, }, "riscv64": { { EnvKey: "GORISCV64", Values: []ArchExtraValue{ {Value: "rva20u64", IsDefault: true}, {Value: "rva22u64"}, }, }, }, "mips": {_Mips}, "mipsle": {_Mips}, "mips64": {_Mips64}, "mips64le": {_Mips64}, "ppc64": {_Ppc64}, "ppc64le": {_Ppc64}, }
View Source
var Platforms = map[string][]string{
"aix": {"ppc64"},
"android": {"386", "amd64", "arm", "arm64"},
"darwin": {"amd64", "arm64"},
"ios": {"amd64", "arm64"},
"dragonfly": {"amd64"},
"freebsd": {"386", "amd64", "arm", "arm64", "riscv64"},
"illumos": {"amd64"},
"js": {"wasm"},
"linux": {"386", "amd64", "arm", "arm64", "mips", "mips64", "mips64le", "mipsle", "ppc64", "ppc64le", "riscv64", "s390x", "loong64"},
"netbsd": {"386", "amd64", "arm", "arm64"},
"openbsd": {"386", "amd64", "arm", "arm64", "mips64", "ppc64", "riscv64"},
"plan9": {"386", "amd64", "arm"},
"solaris": {"amd64"},
"wasip1": {"wasm"},
"windows": {"386", "amd64", "arm", "arm64"},
}
Platforms https://pkg.go.dev/internal/platform
Functions ¶
Types ¶
type ArchExtra ¶ added in v1.2.1
type ArchExtra struct { EnvKey string Values []ArchExtraValue }
type ArchExtraValue ¶ added in v1.2.1
type ArchExtraValue struct { // IsDefault describes whether this extra arch is set by default. IsDefault bool ExtraFloat string // Name maybe empty string, use for replace value of Value in result file name Name string // Value value of env. Value string }
func (ArchExtraValue) Names ¶ added in v1.2.1
func (v ArchExtraValue) Names(showDefault bool) []string
func (ArchExtraValue) NamesExtraFloat ¶ added in v1.2.1
func (v ArchExtraValue) NamesExtraFloat(showDefault bool) []string
type BuildCommand ¶
type BuildCommand struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(target string) BuildCommand
func (BuildCommand) Exec ¶
func (c BuildCommand) Exec() *exec.Cmd
func (BuildCommand) ExecContext ¶ added in v1.4.1
func (c BuildCommand) ExecContext(ctx context.Context) *exec.Cmd
func (BuildCommand) Ldflags ¶
func (c BuildCommand) Ldflags(value string) BuildCommand
func (BuildCommand) OutputName ¶
func (c BuildCommand) OutputName(name string) BuildCommand
func (BuildCommand) ProductionLdflags ¶
func (c BuildCommand) ProductionLdflags() BuildCommand
func (BuildCommand) Run ¶
func (c BuildCommand) Run() ([]byte, error)
func (BuildCommand) TrimPath ¶
func (c BuildCommand) TrimPath() BuildCommand
Click to show internal directories.
Click to hide internal directories.