Ming Deng
650fde66aa
Revert "Merge pull request #4254 from astaxie/develop-2.0"
...
This reverts commit e284b0ddae
, reversing
changes made to 8ef8fd2606
.
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
xlwcom
3c17e2a7e6
remove the comments
2017-07-04 11:03:49 +08:00
xlwcom
234708062a
fix the bug in the "ParseBool" function in the file of config.go
2017-06-29 13:32:40 +08:00
Faissal Elamraoui
5bc3e30653
Added ToString method which converts values of any type to string
2016-11-29 14:55:56 +01:00
ysqi
7e65338c87
Change key format
...
key format : ${ENV_PART||defaultValue} or ${ENV_PART}
2016-03-29 21:47:33 +08:00
ysqi
1b04571c0b
test the env use GOPATH not GOROOT
2016-03-14 19:22:00 +08:00
ysqi
b2a06c5fa0
Update config suport environment variable logic
2016-03-12 14:32:39 +08:00
ysqi
36f69a04a9
remove interfaceToStr function to package config
2016-02-04 20:15:37 +08:00
ysqi
1222c87be3
optimization code
2016-01-28 14:49:44 +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
astaxie
87650ce8bc
make golint happy
2016-01-25 20:57:41 +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
JessonChan
52083de720
typo fixed
...
seperator => separator
2016-01-15 14:07:37 +08:00
astaxie
bdd6a6ae40
golint config
2015-09-10 14:53:19 +08:00
Viet Hung Nguyen
cbb6591bdb
fix typo
2015-08-26 15:57:28 +07: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
傅小黑
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
35d15b8977
fix #350
2013-12-07 14:47:20 +08:00
astaxie
87f8fb0750
finish config module support ini/json/xml/yaml
2013-08-22 00:07:33 +08:00