config

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoticeColor = "\033[1;36m%s\033[0m"
)

Variables

View Source
var (
	// COMMANDS is a top-level directive. Includes all commands to run
	COMMANDS = "commands"
	SHELL    = "shell"
	ENV      = "env"
	EvalEnv  = "eval_env"
	MIXINS   = "mixins"
)

Functions

func GetDefaultConfigPath

func GetDefaultConfigPath() string

func Validate

func Validate(config *Config) error

Validate loaded config

Types

type Config

type Config struct {
	WorkDir  string
	FilePath string
	Commands map[string]command.Command
	Shell    string
	Env      map[string]string
	// contains filtered or unexported fields
}

Config is a struct for loaded config file

func Load

func Load(filename string, rootDir string) (*Config, error)

Load a config from file

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals a config

type ParseError

type ParseError struct {
	Path struct {
		Full  string
		Field string
	}
	Err error
}

func (*ParseError) Error

func (e *ParseError) Error() string

Jump to

Keyboard shortcuts

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