1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-18 09:30:50 +00:00
Commit Graph

103 Commits

Author SHA1 Message Date
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
Ming Deng
30eb889a91 Format code 2020-07-22 23:00:06 +08:00
flycash
ce4ce74c8d Fix validation test 2020-06-06 20:50:48 +08:00
Ming Deng
5100a8c396 fix CI and UT 2020-06-06 18:16:36 +08:00
jianzhiyao
50f71a8a21 fix bug of getting int error 2020-06-02 18:10:17 +08:00
Iskander Sharipov
c998e52cc0 config/yaml: s/bytes.NewBuffer/bytes.NewReader/
When io.Reader is required out of []byte,
it's better to use bytes.NewReader than bytes.NewBuffer.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-10 20:37:43 +03:00
SongLiangChen
8f455ef199 Read over 4096 length values 2018-08-17 11:40:00 +08:00
guomao545
39fc30b8b2
Support return middle level value
fix multilevel yaml config can't correct return middle level value bug
2018-07-27 15:33:24 +08:00
Xingang Zhang
78f2fd8d14 acquire lock when access config data 2018-07-21 14:56:09 +08:00
astaxie
3d3f2ed4c5
Merge pull request #3127 from kaka89/master
Refactor yaml config for support multilevel
2018-05-03 14:07:59 +08:00
umasuo
ccaa2dd9e0
Update yaml.go
delete white line.
2018-04-20 19:44:22 +08:00
umasuo
ba89253e4a
Update yaml.go
add support for multilevel yaml config
2018-04-20 19:40:06 +08: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
astaxie
a91e2e9950 add golint check and fix all golints 2017-04-30 22:41:23 +08:00
astaxie
aa8f7bc146 fix ineffectual 2017-04-28 22:36:28 +08:00
astaxie
d03285a0ee Merge pull request #2555 from Liaodd/master
Update ini.go: change the key to lowercase when set a new key for ini configer
2017-04-24 22:37:25 +08:00
astaxie
b08ace7532 Merge pull request #2577 from ggicci/develop
Fix ini parsing error for multiple users on one machine.
2017-04-19 20:17:45 +08:00
Ggicci
d1a2583972 Fix ini parsing error for multiple users on one machine.
If there were multiple users working on one machine, it's common that
"/tmp/beego" will be owned by one of them, and the others won't be able
to access to it. So, it's better to add an "id-like" postfix to the
temporary directory.
2017-04-19 19:50:11 +08:00
Liaodd
d5c03f5b8f Update ini.go
change the key to lowercase when set a new key for ini configer
2017-04-10 11:30:23 +08:00
Sergey Lanzman
37c1ffc57a add go simple support 2017-03-17 20:22:20 +02:00
astaxie
c2f7f3efa7 Merge pull request #2380 from fugr/config
config:fix handle include other.conf
2017-03-05 22:41:45 +08:00
Mariano Fevola
e0250e2871 Fix typo 2017-03-03 16:24:02 +00:00
Faissal Elamraoui
126dbdae2f use BeeMap instead of a regular map 2017-01-16 10:08:53 +01:00
Faissal Elamraoui
957c0630c0 moved the env package to config/ 2017-01-14 10:15:02 +01:00
fugr
3fa7fc6e41 config:fix handle include other.conf
When include other.conf,other.conf is either absolute directory or under beego in default temporary directory(/tmp/beego).
maybe replace by current directory is better.
2017-01-11 18:55:53 +08:00
fugr
6a2ee371a5 avoid creating new file to implements Config
There is no need to create new file in ParseData(data []byte) (Configer, error).Tet's make code simply.
2017-01-09 21:04:11 +08:00
Faissal Elamraoui
39d40ba8fa This fixes #2294 2016-11-29 14:55:57 +01:00
Faissal Elamraoui
5bc3e30653 Added ToString method which converts values of any type to string 2016-11-29 14:55:56 +01:00
mengyuan
2b442e842e fix path issue in windows 2016-10-14 16:52:03 +08:00
astaxie
7760d24761 fix the typo 2016-08-17 23:52:34 +08:00
ysqi
e9f967102c Fixed parese ini file with empty space line 2016-06-01 19:58:35 +08:00
ysqi
7e65338c87 Change key format
key format : ${ENV_PART||defaultValue} or  ${ENV_PART}
2016-03-29 21:47:33 +08:00
ysqi
5bd7d8c43f Merge branch 'astaxie/develop' into environmentVar 2016-03-29 20:55:29 +08:00
ysqi
1b04571c0b test the env use GOPATH not GOROOT 2016-03-14 19:22:00 +08:00
ysqi
9c7d95b071 go vet 2016-03-14 19:21:09 +08:00
ysqi
b2a06c5fa0 Update config suport environment variable logic 2016-03-12 14:32:39 +08:00
Simon Rawet
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
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
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
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
484ca3a643 fixed test code error 2016-01-27 21:13:11 +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
e1f9491aed Merge pull request #1608 from ysqi/iniSaveErrorFix
Fixed #1607
2016-01-26 21:46:31 +08:00