goconfig

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: AGPL-3.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoConfig

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

GoConfig hold the configuration.

func New

func New() *GoConfig

New creates a new Config.

func (*GoConfig) Add

func (c *GoConfig) Add(key string, defaultValue interface{}, usage string)

Add adds a configuration key with default values and usage information.

func (*GoConfig) AddConfigurationPaths

func (c *GoConfig) AddConfigurationPaths(paths ...string)

AddConfigurationPaths adds the paths where to find the configuration file.

func (*GoConfig) BindFlags

func (c *GoConfig) BindFlags()

BindFlags binds configuration elements to flags.

func (*GoConfig) GetBool

func (c *GoConfig) GetBool(key string) bool

GetBool gets the value as bool.

func (*GoConfig) GetFloat64

func (c *GoConfig) GetFloat64(key string) float64

GetFloat64 gets the value as float64.

func (*GoConfig) GetInt

func (c *GoConfig) GetInt(key string) int

GetInt gets the value as a int.

func (*GoConfig) GetInt64

func (c *GoConfig) GetInt64(key string) int64

GetInt64 gets the value as int64.

func (*GoConfig) GetString

func (c *GoConfig) GetString(key string) string

GetString gets the value as a string.

func (*GoConfig) PrintConfig

func (c *GoConfig) PrintConfig()

PrintConfig prints the configuration.

func (*GoConfig) PrintDebugConfig

func (c *GoConfig) PrintDebugConfig()

PrintDebugConfig prints configuration with resolution steps.

func (*GoConfig) ReadConfig

func (c *GoConfig) ReadConfig()

ReadConfig reads the configuration.

func (*GoConfig) SetConfigName

func (c *GoConfig) SetConfigName(filename string)

SetConfigName sets the configuration filename.

Jump to

Keyboard shortcuts

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