gobuild

package
v0.0.0-...-3b91d86 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DockerImageName = "jakebailey/gobuild-static"

DockerImageName is the image name for the static builder on Docker Hub.

Functions

func Build

func Build(ctx context.Context, cli client.CommonAPIClient, options Options) (io.Reader, error)

Build builds Go completely static binaries in a docker container, and returns an io.Reader, which contains a gzipped tarball of the binaries.

Types

type Options

type Options struct {
	// SrcPath is the path to the Go source. This is mounted in the builder
	// as $GOPATH/src.
	SrcPath string

	// Packages is a list of package names to build.
	Packages []string

	// LDFlags is a string which is inserted into the Go build's ldflags arg.
	LDFlags string
}

Options control the Go build.

Jump to

Keyboard shortcuts

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