config

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config wraps Viper.

func New

func New(path string) *Config

New returns an initialized Config instance.

func (*Config) Get

func (c *Config) Get(key string) string

Get returns the value associated with key.

func (*Config) Init

func (c *Config) Init(r io.Reader, w io.Writer) error

Init create a config file, update it if exists.

func (*Config) List

func (c *Config) List(w io.Writer)

List show config content.

func (*Config) Load

func (c *Config) Load() error

Load read config from the given path.

Jump to

Keyboard shortcuts

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