config

package
v0.0.0-...-132e2ad Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: MIT Imports: 3 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("can't unmarshal config value")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Port int    `yaml:"port"`
	DSN  string `yaml:"dsn"`
}

Config represents a config file.

func ReadFile

func ReadFile(file string) (*Config, error)

ReadFile creates a new config struct from a yaml file.

func (*Config) Default

func (c *Config) Default() error

Default sets the default config.

Jump to

Keyboard shortcuts

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