1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-04 21:50:54 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
astaxie
bdd6a6ae40 golint config 2015-09-10 14:53:19 +08:00
mlgd
9252301fa0 Fix save config ini file 2015-05-25 09:10:37 +08:00
astaxie
14114018ea config ini support include 2014-10-24 19:03:27 +08:00
chenghua
180c6aafac Update ini.go
支持BOM格式的ini文件
2014-10-24 13:45:00 +08:00
xianyu
ccb61f0416 gofmt
Signed-off-by: devYu <devysq@gmail.com>
2014-08-25 21:31:53 +08:00
老虞
14629c214b 优化GetData
1. 去掉重复的ToLower
2. getData内部统一ToLower
3.调整getData中对空字符串判断位置
====
4. 待确定:在getData中是否有必要进行lock操作
2014-08-25 20:14:14 +08:00
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
2820f630c8 config: add more method
DefaultString(key string, defaultval string) string      // support
section::key type in key string when using ini and json type;
Int,Int64,Bool,Float,DIY are same.
	DefaultStrings(key string, defaultval []string) []string //get string
slice
	DefaultInt(key string, defaultval int) int
	DefaultInt64(key string, defaultval int64) int64
	DefaultBool(key string, defaultval bool) bool
	DefaultFloat(key string, defaultval float64) float64
	DIY(key string) (interface{}, error)
	GetSection(section string) (map[string]string, error)
	SaveConfigFile(filename string) error
2014-08-07 17:24:21 +08:00
fuxiaohei
9d0ad3f974 code style simplify 2014-07-13 18:11:13 +08:00
fuxiaohei
9457e61a0c code style simplify 2014-07-12 22:12:06 +08:00
astaxie
fefd8ddb5b beego: update licence& fix #669 2014-07-03 23:40:21 +08:00
astaxie
0f170a80da update the comments fix #658 2014-06-25 10:39:37 +08:00
astaxie
c188cbbcb4 update all files License 2014-05-17 02:26:50 +08:00
astaxie
fee3c2b8f9 add Strings interface can return []string sep by ;
Example:
peers = one;Two;Three
2014-01-15 17:19:03 +08:00
傅小黑
6f3803ce8c Merge remote-tracking branch 'astaxie/master' 2013-12-24 21:59:37 +08:00
傅小黑
a1f6039d82 gofmt code 2013-12-24 21:59:00 +08:00
傅小黑
0183608a59 add comments for config package. 2013-12-24 21:57:33 +08:00
astaxie
d0e2c5c67a config ini module when set section is not exist will panic! 2013-12-24 21:57:15 +08:00
astaxie
b97d9896a4 update config to change section . to :: 2013-12-09 23:54:35 +08:00
Pengfei Xue
8e7fe8bb66 case insensitive for section and key for ini config 2013-11-29 10:17:35 +08:00
smallfish
23ff7af0b7 update logic for check ini comments 2013-11-28 11:56:13 +08:00
astaxie
63b82c438d support section
if iniconf.String("demo.key1") != "asta" {
+		t.Fatal("get demo.key1 error")
+	}
+	if iniconf.String("demo.key2") != "xie" {
+		t.Fatal("get demo.key2 error")
+	}
2013-11-27 23:55:26 +08:00
astaxie
87f8fb0750 finish config module support ini/json/xml/yaml 2013-08-22 00:07:33 +08:00