config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTo

func LoadTo(file string, out interface{}) error

Types

type Config

type Config interface {
	GetValue(key string) (interface{}, bool)
	GetInt(key string) (int, bool)
	GetString(key string) (string, bool)
	GetBool(key string) (bool, bool)
}

type SimpleConfig

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

func Load

func Load(file string) (*SimpleConfig, error)

func (*SimpleConfig) GetBool

func (c *SimpleConfig) GetBool(key string) (bool, bool)

func (*SimpleConfig) GetInt

func (c *SimpleConfig) GetInt(key string) (int, bool)

func (*SimpleConfig) GetString

func (c *SimpleConfig) GetString(key string) (string, bool)

func (*SimpleConfig) GetValue

func (c *SimpleConfig) GetValue(key string) (interface{}, bool)

func (*SimpleConfig) Load

func (c *SimpleConfig) Load(file string) (*SimpleConfig, error)

Jump to

Keyboard shortcuts

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