Documentation
¶
Overview ¶
Package tuco implements primitives for organizing Go crosscompilation.
Index ¶
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.21"
Version is semver.
Variables ¶
var DefaultExcludes = []string{
".DS_Store",
"Thumbs.db",
}
DefaultExcludes collects file path patterns to strip from archives.
Functions ¶
This section is empty.
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"`
// Ports collects target ports.
Ports []Port `yaml:"ports,omitempty"`
// contains filtered or unexported fields
}
Tuco models a crossport build setup.
func (*Tuco) UpdateMaxPortLen ¶
func (o *Tuco) UpdateMaxPortLen()
UpdateMaxPortLen calculates maxPortLen.
func (*Tuco) UpdateTarballRoot ¶
func (o *Tuco) UpdateTarballRoot()
UpdateTarballRoot calculates binary archive root directories.
