spec

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 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 input arguments for build command.

func (*Build) SetDefaults

func (b *Build) SetDefaults()

SetDefaults sets default values for empty fields.

type Error

type Error struct {
	SpecNotFound bool
	// contains filtered or unexported fields
}

Error is the custom error type for spec package.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap returns the next error in the error chain.

type Release

type Release struct {
	Model string `json:"model" yaml:"model"`
	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 input arguments for release command.

func (*Release) SetDefaults

func (r *Release) SetDefaults()

SetDefaults sets default values for empty fields.

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"`
	VersionFile string  `json:"versionFile" yaml:"version_file"`
	Build       Build   `json:"build" yaml:"build"`
	Release     Release `json:"release" yaml:"release"`
}

Spec has all the specifications for Cherry.

func Read

func Read() (*Spec, error)

Read reads and returns specifications from a file.

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

SetDefaults sets default values for empty fields.

Jump to

Keyboard shortcuts

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