Documentation ¶
Overview ¶
Package ini 包实现了读取简单 ini 文件的功能, 并且提供了对应的接口函数,用来监听配置文件是否被修改等一些特定的时间 让开发者自己决定处理配置变化,最终返回一个新的配置文件数据结构。
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultSection is the name of default section. You can use this constant or the string literal. // In most of cases, an empty string is all you need to access the section. DefaultSection = "DEFAULT" // KeyValueDelim is a string which contents all possiable delimiter symbols KeyValueDelim = "=" // CommentSym based on running os to set ';' or '#' CommentSym = "#" // LineBreak is the delimiter to determine or compose a new line. // This variable will be changed to "\r\n" automatically on Windows at package init time. LineBreak = "\n" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // To keep data in order. SecList []string // Actual data is stored here. Sections map[string]*Section }
Config represents a INI files in memory
Config 结构将 ini 文件,以特定的形式将文件内容保存在内存中
type ListenFunc ¶
type ListenFunc func(string)
ListenFunc a default type to implement Listener interface
ListenFunc 是 Listener 接口的一个默认实现结构,可以将实现的 listen 函数转换成该类型传入 watch 函数
Click to show internal directories.
Click to hide internal directories.