<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # config Package config is a Configuration file parser for INI format 包 config 是一個簡潔方的,支持注釋的Go語言配置文件解析器,類似于Windows下的INI文件. 配置文件形式為`[section]`?的段構成, 內部使用?`name=value`鍵值對? 如果為指定段節點,則默認放入名為`[default]`的段當中.? “#”為注釋的開頭,可以放置于任意的單獨一行中. ## 安裝 ~~~ go get github.com/lxmgo/config ~~~ ## 示例 請查看?[conf.ini](http://blog.csdn.net/liuxinmingcode/article/details/testdata/testini.ini)?文件作為使用示例 ## 使用規范 示例配置文件: ~~~ [DEFAULT] host = act.wiki port = 8080 f64 = 64.1 [mysql] host = 127.0.0.1 [mongodb] host = 127.0.0.2 [redis] host = 127.0.0.3 push_key = key1,key2,key3,... [memcache] host = 127.0.0.4 ~~~ 加載配置文件: ~~~ config, err := NewConfig("testdata/testini.ini") c.Int("port") // result is int 8080 c.Int64("port") // result is int64 8080 c.Float64("f64") // result is float64 64.1 c.String("host") // result is string "act.wiki" c.String("mysql.host") // result is string "127.0.0.1" c.String("redis.host") // result is string "127.0.0.3" c.Strings("redis.key") // result is []string{"key1","key2","key3",...} ~~~ ## config APIS: ~~~ 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 ~~~ ## 更多信息 所有字符解析均使用小寫的! ## 源碼 [https://github.com/lxmgo/config](https://github.com/lxmgo/config) ## Go交流群 185521558
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看