config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFile = ".chartreleaser.yml"

DefaultFile is the default configuration file name for chart-releaser.

Variables

View Source
var (
	ErrConfigExists    = errors.New(".chartreleaser,yml config file already exists")
	ErrNoConfig        = errors.New(".chartreleaser.yml file not found")
	ErrNoConfigVersion = errors.New("no version specified in config")
)

Errors related to loading and parsing chart-releaser configuration.

Functions

func GetConfigPath

func GetConfigPath(path string) (string, error)

GetConfigPath gets the path to the chart-releaser config file.

Types

type VersionedConfig

type VersionedConfig struct {
	Version *string `yaml:"version,omitempty"`
	// contains filtered or unexported fields
}

VersionedConfig is a lightweight struct which is used as a first step in loading config files as a means to get the config version. Once the config version is known, the correct versioned struct can be used to unmarshal the data.

func Load

func Load(p string) (*VersionedConfig, error)

Load the config file at the specified path into a VersionedConfig.

func (*VersionedConfig) GetData

func (c *VersionedConfig) GetData() []byte

GetData gets the data, as bytes, for the config file.

func (*VersionedConfig) GetPath

func (c *VersionedConfig) GetPath() string

GetPath gets the path which the config was loaded from.

func (*VersionedConfig) GetVersion

func (c *VersionedConfig) GetVersion() string

GetVersion gets the version scheme for the config file.

Jump to

Keyboard shortcuts

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