Documentation ¶
Overview ¶
Package config 包含解析配置文件相关工具
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface { // GlobalSection 获取全局配置段 GlobalSection() Section // Section 根据name获取指定名称的配置段 Section(name string) (Section, bool) // Sections 返回全部节 Sections() []Section }
配置信息存储接口
type Error ¶
type Error string
错误信息
const ( ErrorInvalidConfigParser Error = "ErrorInvalidConfigParser(C10000):无效的配置解析器" ErrorInvalidKey Error = "ErrorInvalidKey(C10010):无效的key(%s)" ErrorInvalidTypeConvertion Error = "ErrorInvalidTypeConvertion(C10020):无效的类型转换,string(%s)转换为%s" ErrorInvalidConfigKind Error = "ErrorInvalidConfigKind(C10030):无效的配置类型(%s)" ErrorReadError Error = "ErrorReadError(C10040):无法读取配置文件(%s)" ErrorNotMatch Error = "ErrorNotMatch(C10050):未找到匹配的字符(%s)" )
错误码
type IniConfig ¶
type IniConfig struct {
// contains filtered or unexported fields
}
Ini配置
func (*IniConfig) GlobalSection ¶
GlobalSection 获取全局配置段
Click to show internal directories.
Click to hide internal directories.