cmd

package
v0.0.0-...-64567a0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductsParamName = "products"
	OSArchFlagName    = "os-arch"
)

Variables

View Source
var (
	ProductsParam = flag.StringSlice{
		Name:     ProductsParamName,
		Usage:    "Products for which action should be performed",
		Optional: true,
	}
	OSArchFlag = flag.StringFlag{
		Name:  OSArchFlagName,
		Usage: "GOOS-GOARCH for the command (comma-separate for multiple values)",
	}
)

Functions

func ScriptEnvVariables

func ScriptEnvVariables(buildSpec params.ProductBuildSpec, outputProductDir string) map[string]string

Types

type BuildFunc

type BuildFunc func(buildSpecWithDeps []params.ProductBuildSpecWithDeps, stdout io.Writer) error

func ProcessSerially

func ProcessSerially(f func(buildSpec params.ProductBuildSpecWithDeps, stdout io.Writer) error) BuildFunc

ProcessSerially returns a BuildFunc that processes each of the provided specs in order using the provided function. If the function returns an error for any of the specifications, the function immediately returns that error.

func ProcessSeriallyBatchErrors

func ProcessSeriallyBatchErrors(f func(buildSpec params.ProductBuildSpecWithDeps, stdout io.Writer) error) BuildFunc

ProcessSeriallyBatchErrors returns a BuildFunc that processes each of the provided specs in order using the provided function. If the function returns an error for any of the specifications, it is stored, but the function will will continue processing the provided specifications. The function return nil if no errors occurred; otherwise, it returns a SpecErrors error that contains the individual errors.

type OSArchFilter

type OSArchFilter []osarch.OSArch

func NewOSArchFilter

func NewOSArchFilter(osArchs string) (OSArchFilter, error)

func (OSArchFilter) Matches

func (f OSArchFilter) Matches(osArch osarch.OSArch) bool

Matches returns true if the provided osArch is in the filter list or if the filter list is empty.

type ProcessFunc

type ProcessFunc func(f func(buildSpec params.ProductBuildSpecWithDeps, stdout io.Writer) error) BuildFunc

type SpecErrors

type SpecErrors struct {
	Errors map[string]error
}

func (*SpecErrors) Error

func (e *SpecErrors) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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