同步操作将从 无闻/goconfig 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
IMPORTANT
Package goconfig is a easy-use, comments-support configuration file parser for the Go Programming Language, which provides a structure similar to what you would find on Microsoft Windows INI files.
The configuration file consists of sections, led by a [section]
header and followed by name:value
or name=value
entries. Note that leading whitespace is removed from values. The optional values can contain format strings which refer to other values in the same section, or values in a special DEFAULT section. Comments are indicated by ";" or "#"; comments may begin anywhere on a single line.
go get github.com/Unknwon/goconfig
Or
gopm get github.com/Unknwon/goconfig
Please see conf.ini as an example.
LoadConfigFile
load file(s) depends on your situation, and return a variable with type ConfigFile
.GetValue
gives basic functionality of getting a value of given section and key.Bool
, Int
, Int64
return corresponding type of values.Must
return corresponding type of values and returns zero-value of given type if something goes wrong.SetValue
sets value to given section and key, and inserts somewhere if it does not exist.DeleteKey
deletes by given section and key.SaveConfigFile
saves your configuration to local file system.Reload
in case someone else modified your file(s).Comment
help you manipulate comments.LoadFromReader
allows loading data without an intermediate file.SaveConfigData
added, which writes configuration to an arbitrary writer.ReloadData
allows to reload data from memory.Note that you cannot mix in-memory configuration with on-disk configuration.
This project is under Apache v2 License. See the LICENSE file for the full license text.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。