Documentation ¶
Index ¶
- Constants
- func Token(srcBuffer []byte, begin int, end int, toLower bool) (string, int)
- type CfgInfo
- type CfgKey
- type Config
- func (c *Config) Bool(key string) bool
- func (c *Config) Float32(key string) float32
- func (c *Config) Float64(key string) float64
- func (c *Config) Get(key string) string
- func (c *Config) Get2(key string, sep string) (string, string)
- func (c *Config) Get3(seciton string, key string, sectionid ...int) string
- func (c *Config) Get5(key string, sep string) []string
- func (c *Config) Get6(section string, key string, sep string) []string
- func (c *Config) Int(key string) int
- func (c *Config) Int64(key string) int64
- func (c *Config) Read(path string)
- func (c *Config) Time(key string) int64
- type ICfonfig
- type SectionInfo
Constants ¶
View Source
const ( STATE_NONE = iota STATE_SECTION = iota STATE_VALUE = iota MAX_LINE_LENGTH = 2048 BUFFER_LENGTH = 512 MAX_TOKEN_LENGTH = 128 MAX_HOSTNAME_LEN = 128 DEFAULT_CONFIG = 0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CfgInfo ¶
type CfgInfo map[CfgKey]SectionInfo
type ICfonfig ¶
type ICfonfig interface { Read(string) Get(key string) string //获取key Get2(key string, sep string) (string, string) //获取ip Get3(section string, key string, secitonId ...int) string //根据section, key, sectionid(从0开始) Get5(key string, sep string) []string //获取数组 Get6(section string, key string, sep string) []string //获取数组 Int(key string) int Int64(key string) int64 Float32(key string) float32 Float64(key string) float64 Bool(key string) bool Time(key string) int64 }
type SectionInfo ¶
Click to show internal directories.
Click to hide internal directories.