config

package
v0.0.0-...-b785d8f Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config provides a common infrastructure for reading configuration data stored in local TOML files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(path string, dest interface{}) error

Read takes the TOML configuration file at `path`, parses it into `dest` and then uses github.com/asaskevich/govalidator to validate the struct.

Types

type InvalidConfigError

type InvalidConfigError struct {
	InvalidFields map[string]string
}

InvalidConfigError is the error that is returned when an invalid configuration is encountered by the `Read` func.

func (*InvalidConfigError) Error

func (err *InvalidConfigError) Error() string

Jump to

Keyboard shortcuts

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