Documentation
¶
Overview ¶
Package tuco implements primitives for organizing Go crosscompilation.
Index ¶
- Constants
- func DefaultExcludes() []string
- type Port
- type Tuco
- func (o Tuco) Archive(port Port) error
- func (o Tuco) Build(port Port) error
- func (o Tuco) Clean() error
- func (o Tuco) ExecutableOutputPath(port Port) string
- func (o Tuco) Prefix(port Port) string
- func (o *Tuco) Run() []error
- func (o *Tuco) UpdateMaxPortLen()
- func (o *Tuco) UpdatePortCache() error
- func (o *Tuco) UpdateTarballRoot()
Constants ¶
const ConfigurationFilename = "tuco.yaml"
ConfigurationFilename denotes the location of the tuco configuration file, relative to the current working directory.
const DefaultArtifacts = "bin"
DefaultArtifacts denotes the default location of the artifact directory tree.
const DefaultJobs uint = 4
DefaultJobs denotes the default number of goroutines.
const Version = "0.0.22"
Version is semver.
Variables ¶
This section is empty.
Functions ¶
func DefaultExcludes ¶ added in v0.0.21
func DefaultExcludes() []string
DefaultExcludes generates file path patterns to strip from archives.
Types ¶
type Port ¶
type Port struct {
// Os denotes a high-level environment.
//
// Example: "linux"
Os string
// Arch denotes a low-level environment.
//
// Example: "amd64"
Arch string
}
Port models a basic targetable execution configuration.
func ParsePort ¶
ParsePort constructs a port from a string. https://go.dev/wiki/PortingPolicy
func (Port) MarshalYAML ¶
MarshalYAML encodes YAML.
type Tuco ¶
type Tuco struct {
// Debug enables additional logging.
Debug bool `yaml:"debug,omitempty"`
// Artifacts denotes the location of the toplevel artifacts directory (default: `DefaultArtifacts`).
Artifacts string `yaml:"artifacts,omitempty"`
// Banner denotes a software application identifier (required, nonblank).
Banner string `yaml:"banner"`
// Jobs limits the number of goroutines (default: `DefaultJobs`).
Jobs uint `yaml:"jobs,omitempty"`
// Excludes skips matching file paths from archival.
//
// Glob syntax
// https://pkg.go.dev/path/filepath#Match
Excludes []string `yaml:"excludes,omitempty"`
// GoArgs collects additional `go build`... CLI flags
GoArgs []string `yaml:"go_args,omitempty"`
// Os enables matching Go ports by GOOS.
Os []string `yaml:"os,omitempty"`
// Arch enables matching Go ports by GOARCH.
Arch []string `yaml:"arch,omitempty"`
// contains filtered or unexported fields
}
Tuco models a crossport build setup.
func (Tuco) ExecutableOutputPath ¶ added in v0.0.22
ExecutableOutputPath generates file paths for executables.
func (*Tuco) UpdateMaxPortLen ¶
func (o *Tuco) UpdateMaxPortLen()
UpdateMaxPortLen calculates maxPortLen.
func (*Tuco) UpdatePortCache ¶ added in v0.0.22
func (*Tuco) UpdateTarballRoot ¶
func (o *Tuco) UpdateTarballRoot()
UpdateTarballRoot calculates binary archive root directories.
