Version: v1.2.0 Latest Latest

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

Go to latest
Published: May 16, 2014 License: Apache-2.0 Imports: 8 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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.

func (*XMLConfig) Parse

func (xmls *XMLConfig) Parse(filename string) (config.ConfigContainer, error)

Parse returns a ConfigContainer with parsed xml config map.

type XMLConfigContainer

type XMLConfigContainer struct {
	// contains filtered or unexported fields

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL