Documentation ¶
Overview ¶
Package conf implements parse the taf config.
Index ¶
- type Conf
- func (c *Conf) GetDomain(path string) []string
- func (c *Conf) GetInt(path string) int
- func (c *Conf) GetIntWithDef(path string, defVal int) int
- func (c *Conf) GetMap(path string) map[string]string
- func (c *Conf) GetString(path string) string
- func (c *Conf) GetStringWithDef(path string, defVal string) string
- func (c *Conf) InitFromBytes(content []byte) error
- func (c *Conf) InitFromFile(fileName string) error
- func (c *Conf) InitFromString(content string) error
- func (c *Conf) ToString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
Conf struct for parse xml-like tars config file.
func (*Conf) GetIntWithDef ¶
GetIntWithDef gets int from the given path with the default value.
func (*Conf) GetStringWithDef ¶
GetStringWithDef gets string from the given path with the default value.
func (*Conf) InitFromBytes ¶
InitFromBytes inits the Conf with the []byte.
func (*Conf) InitFromFile ¶
InitFromFile init the conf with the file.
func (*Conf) InitFromString ¶
InitFromString inits Conf from string.
Click to show internal directories.
Click to hide internal directories.