config

package
v0.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	XGoConfig XGoConfig
	// Root of the project (where go.mod is located)
	RootPath   string
	BinTempDir string
	// Relative path to the main package (from the root)
	MainPkgRelPath string
	// List of targets to build
	Targets map[Target]TargetConfig
}

type Target

type Target struct {
	Os   consts.Os
	Arch consts.Arch
}

func (Target) String

func (t Target) String() string

type TargetBuildConfig

type TargetBuildConfig struct {
	// Enable data race detection (supported only on amd64)
	Race *bool `json:"race,omitempty"`
	// List of build tags to consider satisfied during the build
	Tags string `json:"tags,omitempty"`
	// Arguments to pass on each go tool link invocation
	LdFlags string `json:"ldflags,omitempty"`
	// Indicates which kind of object file to build
	Mode string `json:"mode,omitempty"`
	// Whether to stamp binaries with version control information
	VCS string `json:"vcs,omitempty"`
	// Remove all file system paths from the resulting executable
	TrimPath *bool `json:"trimpath,omitempty"`
	// CGO dependency configure arguments
	CrossArgs string `json:"cross_args,omitempty"`
}

type TargetConfig

type TargetConfig struct {
	TargetBuildConfig TargetBuildConfig
	OutBinPath        string
}

type Targets

type Targets []Target

func (Targets) Strings

func (t Targets) Strings() []string

type XGoConfig

type XGoConfig struct {
	// Go release to use for cross compilation (flag: go)
	GoVersion string `json:"go_version,omitempty"`
	// Set a Global Proxy for Go Modules
	GoProxy string `json:"go_proxy,omitempty"`
	Verbose *bool  `json:"verbose,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL