yaml

package
v0.0.0-...-df1328e Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2016 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package yaml provides configuration loading from yaml file.

Load(config interface{}) gets struct.

// Config struct

type Config struct {
	Debug   bool   `yaml:"debug"`
	Timeout int    `yaml:"timeout"`
	Name    string `yaml:"name"`
	Data    Data   `yaml:"data"`
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigManager

type ConfigManager struct {
	// contains filtered or unexported fields
}

ConfigManager struct

func NewConfig

func NewConfig(file string) *ConfigManager

NewConfig constructor

func (*ConfigManager) Load

func (cm *ConfigManager) Load(config interface{}) error

Load config from file

Jump to

Keyboard shortcuts

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