8b0957cf2e
Fixed infinite loop in ini config adapter
...
If parseFile recived a directory it would go into a infinit loop
2016-03-12 00:20:19 +01:00
19d921d3f5
Return nil not empty []string{}
...
Return nil if config value does not exist or is empty
2016-03-03 20:03:23 +08:00
8ff74e71cb
Fixed #1735 Return empty []string
...
Need return empty []string if config value is empty.
split `“”` ==> []string{}, Not []string{“”}
2016-03-02 22:44:20 +08:00
e1f9491aed
Merge pull request #1608 from ysqi/iniSaveErrorFix
...
Fixed #1607
2016-01-26 21:46:31 +08:00
f8004b69ad
fix the go vet
2016-01-25 21:33:57 +08:00
87650ce8bc
make golint happy
2016-01-25 20:57:41 +08:00
cf055c9db2
Merge branch 'astaxie/develop' into iniSaveErrorFix
...
# Conflicts:
# config/ini_test.go
2016-01-24 11:37:43 +08:00
51ae45a799
Fixed #1607
2016-01-23 14:53:52 +08:00
be544f963e
Support Parse Bool with more diffrent values
...
ParseBool returns the boolean value represented by the string.
It accepts 1, 1.0, t, T, TRUE, true, True, YES, yes, Yes,Y, y, ON, on,
On,
0, 0.0, f, F, FALSE, false, False, NO, no, No, N,n, OFF, off, Off.
Any other value returns an error.
2016-01-23 11:02:40 +08:00
90d1349665
fix typo
2016-01-17 23:48:17 +08:00
52083de720
typo fixed
...
seperator => separator
2016-01-15 14:07:37 +08:00
bdd6a6ae40
golint config
2015-09-10 14:53:19 +08:00
cbb6591bdb
fix typo
2015-08-26 15:57:28 +07:00
9252301fa0
Fix save config ini file
2015-05-25 09:10:37 +08:00
572508ddd8
Clean json config. Fix DefaultStrings
2014-12-17 17:02:46 +08:00
14114018ea
config ini support include
2014-10-24 19:03:27 +08:00
180c6aafac
Update ini.go
...
支持BOM格式的ini文件
2014-10-24 13:45:00 +08:00
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
a144769515
update the documents & comments
2014-08-18 16:41:43 +08:00
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
38188098c5
fix testing fail
2014-07-17 16:48:10 +08:00
c372328f88
code style simplify
2014-07-17 16:22:52 +08:00
a6ced64441
code style simplify
2014-07-17 16:22:41 +08:00
84da1c924a
code style simplify
2014-07-17 15:56:06 +08:00
f733b5707a
code style simplify
2014-07-17 15:49:40 +08:00
e52386b52d
code style simplify
2014-07-15 10:01:26 +08:00
9d0ad3f974
code style simplify
2014-07-13 18:11:13 +08:00
9457e61a0c
code style simplify
2014-07-12 22:12:06 +08:00
20e05a3908
code style simplify
2014-07-12 16:03:14 +08:00
fefd8ddb5b
beego: update licence& fix #669
2014-07-03 23:40:21 +08:00
0f170a80da
update the comments fix #658
2014-06-25 10:39:37 +08:00
3b934bb910
config: fix error when json config starts with an array
2014-06-11 11:33:32 +03:00
a673a85d4a
added tests config/json_test that test missing key usecases. created a template function to fetch AppConfig values
2014-05-30 23:48:23 -05:00
ef815bf5fc
config: fix the import issue
2014-05-17 02:26:51 +08:00
c188cbbcb4
update all files License
2014-05-17 02:26:50 +08:00
4245521660
fix #576
2014-05-17 02:26:50 +08:00
d58e9e6e12
beego: move dependency module to sub package
2014-04-03 23:41:48 +08:00
fee3c2b8f9
add Strings interface can return []string sep by ;
...
Example:
peers = one;Two;Three
2014-01-15 17:19:03 +08:00
3b99f37aa1
add a empty fake config Initialize AppConfig to avoid nil pointer runtime error.
2014-01-11 14:28:11 +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
d0e2c5c67a
config ini module when set section is not exist will panic!
2013-12-24 21:57:15 +08:00
3a0b2e3b95
beego config module json support get data like key: 🔑 :key
2013-12-10 18:09:58 +08:00
b97d9896a4
update config to change section . to ::
2013-12-09 23:54:35 +08:00
35d15b8977
fix #350
2013-12-07 14:47:20 +08:00
27a02082a3
miswrite a type of word
2013-12-05 19:20:08 +08:00
3c91360d72
dictinct system pkg and third pkg
2013-12-03 21:37:39 +08:00
8e7fe8bb66
case insensitive for section and key for ini config
2013-11-29 10:17:35 +08:00