Documentation ¶
Overview ¶
Package golangutils holds utility functions, wrappers, and types for building Go binaries for Grafana.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildOpts ¶
type BuildOpts struct { // Package refers to the path to the `main` package containing `func main` Package string // Output is used as the -o argument in the go build command Output string // Workdir should define some place in the module where the package path resolves. // Go commands need to be ran inside a the Go module directory. Workdir string GoOS config.OS GoArch config.Architecture GoArm string Go386 string CC string LibC string CGoEnabled bool CGoCFlags string // LdFlags are joined by a space character and provided to the -ldflags argument. // A valid element here would be `-X 'main.version=1.0.0'`. LdFlags []string Stdout io.ReadWriter Stderr io.ReadWriter Stdin io.ReadWriter // ExtraEnv allows consumers to provide extra env args that are not defined above. // A single element should be formatted using like so: {NAME}={VALUE}. Example: GOOS=linux. ExtraEnv []string // ExtraArgs allows consumers to provide extra arguments that are not defined above. // Flag names and values should be two separate elements. // These flags will be appended to the command arguments before the package path in "go build". ExtraArgs []string }
Click to show internal directories.
Click to hide internal directories.