configex

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNil = errors.New("nil value")
)

Functions

func YamlParse added in v0.0.2

func YamlParse(file string, in interface{}) error

Types

type Config

type Config struct {
	Values map[string]string
}

func NewConfig

func NewConfig() *Config

func ReadConfig

func ReadConfig(data []byte) (*Config, error)

func ReadConfigFile

func ReadConfigFile(name string) (*Config, error)

func (*Config) GetBool

func (c *Config) GetBool(key string) (bool, error)

func (*Config) GetInt

func (c *Config) GetInt(key string) (int, error)

func (*Config) GetInt64

func (c *Config) GetInt64(key string) (int64, error)

func (*Config) GetString

func (c *Config) GetString(key string) (string, error)

func (*Config) GetUint64

func (c *Config) GetUint64(key string) (uint64, error)

func (*Config) Read

func (c *Config) Read(r io.Reader) error

func (*Config) SetBool

func (c *Config) SetBool(key string, v bool)

func (*Config) SetInt

func (c *Config) SetInt(key string, n int)

func (*Config) SetInt64

func (c *Config) SetInt64(key string, n int64)

func (*Config) SetString

func (c *Config) SetString(key string, value string)

func (*Config) SetUint64

func (c *Config) SetUint64(key string, n uint64)

func (*Config) Write

func (c *Config) Write(w io.Writer) error

func (*Config) WriteFile

func (c *Config) WriteFile(filePath string) error

Jump to

Keyboard shortcuts

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