Documentation ¶
Overview ¶
Package conf provides .conf file loading and unmarshalling
Package conf provides .conf file loading and unmarshalling ¶
Package conf provides .conf file loading and unmarshalling
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentConfigPath ¶
func GetCurrentConfigPath() string
GetCurrentConfigPath returns a path of the current config file.
func Unmarshal ¶
func Unmarshal(data interface{}, v interface{}, args ...interface{}) (err error)
Unmarshal unmarshals input data into specified structure. The input data can be either a byte array ([]byte) with configuration file or interface{} either returned by Marshal or a configuration file Unmarshaled into interface{} variable before. The third is optional 'strict' parameter that forces strict validation of configuration and structure fields (enabled by default). When disabled it will unmarshal part of configuration into incomplete target structures.
Types ¶
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
Meta structure is used to store the 'conf' tag metadata.
type Node ¶
type Node struct { Name string Nodes []interface{} Line int // contains filtered or unexported fields }
Node structure is used to store parsed conf file parameters or parameter components.
type Session ¶
type Session struct { URI string `conf:"name=Uri,optional"` Password string `conf:"optional"` User string `conf:"optional"` }
Session is a general structure for storing sessions' configuration.
type Suffix ¶
type Suffix struct {
// contains filtered or unexported fields
}