GO
lovzm
这个作者很懒,什么都没留下…
展开
-
GO语言: 读取配置文件的方式toml
最近go语言项目中用到读取配置文件,如下:使用这个"github.com/BurntSushi/toml" 配置文件如下:conf.toml# id ID = 1 # name Name = "name1" # weight Weight = 1.7 # books Books = ["a", "b", "c"] Sex = true #friend Friend都可以 [friend] Age...原创 2017-02-14 15:40:56 · 10089 阅读 · 0 评论 -
Go--Logger学习
Go语言的log Logger struct type Logger struct { mu sync.Mutex prefix string flag int out io.Writer buf []byte } 用于记录日志,sync.Mutex 锁mu, prefix 每条日志的前缀,flag 有Ldata...翻译 2018-04-07 08:40:05 · 1241 阅读 · 0 评论