config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnmarshal is returned when config can't be unmarshaled.
	ErrUnmarshal = errors.New("max: can't unmarshal config value")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Args    map[string]interface{}
	Tasks   map[string]*task.Task
	Version string
}

Config represents a config file.

func ReadContent

func ReadContent(content string) (*Config, error)

ReadContent creates a new config struct from a string.

func ReadFile

func ReadFile(args ...string) (*Config, error)

ReadFile creates a new config struct from a yaml file.

func (*Config) UnmarshalYAML

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

UnmarshalYAML implements yaml packages interface to unmarshal custom values.

Jump to

Keyboard shortcuts

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