Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) AddConfig(section string, option string, value string) bool
- func (c *Config) Bool(key string) (bool, error)
- func (c *Config) Float64(key string) (float64, error)
- func (c *Config) Int(key string) (int, error)
- func (c *Config) Int64(key string) (int64, error)
- func (c *Config) Set(key string, value string) error
- func (c *Config) String(key string) string
- func (c *Config) Strings(key string) []string
- type ConfigInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DEFAULT_SECTION = "default" DEFAULT_COMMENT = []byte{'#'} DEFAULT_COMMENT_SEM = []byte{';'} )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type ConfigInterface ¶
type ConfigInterface interface {
String(key string) string
Strings(key string) []string
Bool(key string) (bool, error)
Int(key string) (int, error)
Int64(key string) (int64, error)
Float64(key string) (float64, error)
Set(key string, value string) error
}
func NewConfig ¶
func NewConfig(confName string) (ConfigInterface, error)
NewConfig create an empty configuration representation.
Click to show internal directories.
Click to hide internal directories.