Commit 83f0fcb 1 parent 66e65b9 commit 83f0fcb Copy full SHA for 83f0fcb
File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ var configSample []byte
15
15
var Convert struct {
16
16
Source string
17
17
Target string
18
- ProcessFiles []* File
18
+ ProcessFiles []File
19
19
EnableRegex bool
20
20
}
21
21
@@ -62,10 +62,10 @@ func update() {
62
62
log .L ().Sugar ().Fatal ("source or target is empty" )
63
63
}
64
64
65
- Convert .ProcessFiles = make ([]* File , 0 )
65
+ Convert .ProcessFiles = make ([]File , 0 )
66
66
for _ , file := range viper .Get ("convert.processFiles" ).([]interface {}) {
67
67
t := file .(map [string ]interface {})
68
- f := & File {
68
+ f := File {
69
69
Name : t ["name" ].(string ),
70
70
Type : t ["type" ].(string ),
71
71
}
Original file line number Diff line number Diff line change @@ -4,8 +4,13 @@ import (
4
4
"testing"
5
5
6
6
"github.com/dn-11/provider2domainset/conf"
7
+ "github.com/dn-11/provider2domainset/log"
7
8
)
8
9
9
10
func TestParseConfig (t * testing.T ) {
10
11
conf .Init ("config-sample.yaml" )
12
+
13
+ log .L ().Sugar ().Infof ("log: %+v" , conf .Log )
14
+ log .L ().Sugar ().Infof ("convert: %+v" , conf .Convert )
15
+ log .L ().Sugar ().Infof ("service: %+v" , conf .Service )
11
16
}
You can’t perform that action at this time.
0 commit comments