spec

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	CrossCompile   bool     `json:"crossCompile" yaml:"cross_compile"`
	MainFile       string   `json:"mainFile" yaml:"main_file"`
	BinaryFile     string   `json:"binaryFile" yaml:"binary_file"`
	VersionPackage string   `json:"versionPackage" yaml:"version_package"`
	GoVersions     []string `json:"goVersions" yaml:"go_versions"`
	Platforms      []string `json:"platforms" yaml:"platforms"`
}

Build has the specifications for build command.

func (*Build) FlagSet

func (b *Build) FlagSet() *flag.FlagSet

FlagSet returns a flag set for arguments of build command.

func (Build) WithDefaults added in v0.5.0

func (b Build) WithDefaults() Build

WithDefaults returns a new object with default values.

type Release

type Release struct {
	Build bool `json:"build" yaml:"build"`
}

Release has the specifications for release command.

func (*Release) FlagSet

func (r *Release) FlagSet() *flag.FlagSet

FlagSet returns a flag set for arguments of release command.

func (Release) WithDefaults added in v0.5.0

func (r Release) WithDefaults() Release

WithDefaults returns a new object with default values.

type Spec

type Spec struct {
	ToolName    string `json:"-" yaml:"-"`
	ToolVersion string `json:"-" yaml:"-"`

	Version  string  `json:"version" yaml:"version"`
	Language string  `json:"language" yaml:"language"`
	Build    Build   `json:"build" yaml:"build"`
	Release  Release `json:"release" yaml:"release"`
}

Spec has all the specifications for Cherry.

func FromFile added in v0.5.0

func FromFile() (Spec, error)

FromFile reads and returns specifications from a file. If no spec file is found, a new spec with zero values will be returned.

func (Spec) WithDefaults added in v0.5.0

func (s Spec) WithDefaults() Spec

WithDefaults returns a new object with default values.

Jump to

Keyboard shortcuts

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