Ming Deng
650fde66aa
Revert "Merge pull request #4254 from astaxie/develop-2.0"
...
This reverts commit e284b0ddae072311617a6fdd8393eb04aba873d2, reversing
changes made to 8ef8fd26068a7b70865acbabee89f6691ae553a9.
2020-11-26 17:48:29 +08:00
Ming Deng
b4a85c8f13
Remove files
2020-08-16 23:09:19 +08:00
Ming Deng
c22af4c611
Fix Tracing and prometheus bug
2020-08-11 03:23:38 +00:00
Ming Deng
2e192e1ed0
Depracated config module and recommend using pkg/config
2020-08-08 13:26:30 +00:00
qshuai
889408136b
fix typo
2018-03-28 00:26:06 +08:00
ysqi
b2a06c5fa0
Update config suport environment variable logic
2016-03-12 14:32:39 +08:00
ysqi
86c7f1db9e
Merge branch 'astaxie/develop' into environmentVar
...
# Conflicts:
# config/fake.go
# config/xml/xml_test.go
# config/yaml/yaml_test.go
2016-03-10 19:57:16 +08:00
ysqi
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
ysqi
cd31c816cc
Config support get environment variable
...
get environment variable if config item has prefix "$ENV_" .
e.g.
```ini
[demo]
password = $ENV_MyPWD
```
2016-01-27 20:46:30 +08:00
ysqi
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
astaxie
bdd6a6ae40
golint config
2015-09-10 14:53:19 +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
20e05a3908
code style simplify
2014-07-12 16:03:14 +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
slene
3b99f37aa1
add a empty fake config Initialize AppConfig to avoid nil pointer runtime error.
2014-01-11 14:28:11 +08:00