File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ [app ]
2
+ AppName = " testCyj"
3
+
4
+ [server ]
5
+ ip =" 0.0.0.0"
6
+ port =1234
7
+ locale = " zh"
8
+
9
+ [mysql .main ]
10
+ tablePrefix = " testCyj"
11
+ host = " 127.0.0.1"
12
+ username = " root"
13
+ password = " root"
14
+ dbName = " testCyj"
15
+ type = " mysql"
16
+ port = " 3306"
17
+ debug = true
18
+
19
+ [redis .main ]
20
+ addr = " 127.0.0.1:6379"
21
+
22
+ [email .main ]
23
+ host = " smtp.yeah.net"
24
+ port = 465
25
+ username = " "
26
+ password = " "
27
+
28
+ [sms .main ]
29
+ area = " cn-hangzhou"
30
+ accessKeyId = " "
31
+ accessSecret = " "
32
+
33
+ [xlog ]
34
+ name = " testCyj.log"
35
+ dir = " ."
36
+ level = " "
37
+ async = false
38
+ debug = true
39
+ add_caller = true
40
+ caller_skip =2
41
+
42
+ [app .govern ]
43
+ host = " 127.0.0.1"
44
+ port = 4569
45
+
46
+ [trace .jaeger ]
47
+ [trace .jaeger .reporter ]
48
+ localAgentHostPort = " 127.0.0.1:6831"
Original file line number Diff line number Diff line change
1
+ package file
2
+
3
+ import (
4
+ "github.com/coder2z/g-saber/xcfg"
5
+ "testing"
6
+ )
7
+
8
+ func TestNewDataSource (t * testing.T ) {
9
+ err := xcfg .LoadFromConfigAddr ("config.toml" )
10
+ if err != nil {
11
+ t .Log (err )
12
+ return
13
+ }
14
+ t .Log (xcfg .Get ("app" ))
15
+ }
16
+
You can’t perform that action at this time.
0 commit comments