Documentation ¶
Index ¶
- type XMLConfig
- type XMLConfigContainer
- func (c *XMLConfigContainer) Bool(key string) (bool, error)
- func (c *XMLConfigContainer) DIY(key string) (v interface{}, err error)
- func (c *XMLConfigContainer) Float(key string) (float64, error)
- func (c *XMLConfigContainer) Int(key string) (int, error)
- func (c *XMLConfigContainer) Int64(key string) (int64, error)
- func (c *XMLConfigContainer) Set(key, val string) error
- func (c *XMLConfigContainer) String(key string) string
- func (c *XMLConfigContainer) Strings(key string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type XMLConfig ¶
type XMLConfig struct { }
XmlConfig is a xml config parser and implements Config interface. xml configurations should be included in <config></config> tag. only support key/value pair as <key>value</key> as each item.
type XMLConfigContainer ¶
A Config represents the xml configuration.
func (*XMLConfigContainer) Bool ¶
func (c *XMLConfigContainer) Bool(key string) (bool, error)
Bool returns the boolean value for a given key.
func (*XMLConfigContainer) DIY ¶
func (c *XMLConfigContainer) DIY(key string) (v interface{}, err error)
DIY returns the raw value by a given key.
func (*XMLConfigContainer) Float ¶
func (c *XMLConfigContainer) Float(key string) (float64, error)
Float returns the float value for a given key.
func (*XMLConfigContainer) Int ¶
func (c *XMLConfigContainer) Int(key string) (int, error)
Int returns the integer value for a given key.
func (*XMLConfigContainer) Int64 ¶
func (c *XMLConfigContainer) Int64(key string) (int64, error)
Int64 returns the int64 value for a given key.
func (*XMLConfigContainer) Set ¶
func (c *XMLConfigContainer) Set(key, val string) error
WriteValue writes a new value for key.
func (*XMLConfigContainer) String ¶
func (c *XMLConfigContainer) String(key string) string
String returns the string value for a given key.
func (*XMLConfigContainer) Strings ¶
func (c *XMLConfigContainer) Strings(key string) []string
Strings returns the []string value for a given key.
Click to show internal directories.
Click to hide internal directories.