File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010 "os"
1111 "runtime"
1212
13- "gopkg.in/yaml.v2 "
13+ "gopkg.in/yaml.v3 "
1414)
1515
1616// build info, assign by compile time or runtime.
@@ -21,19 +21,19 @@ var (
2121)
2222
2323type config struct {
24- Host string `json :"host"`
25- Addr string `json :"addr"`
26- Store string `json :"store"`
27- Log string `json :"log"`
24+ Host string `yaml :"host"`
25+ Addr string `yaml :"addr"`
26+ Store string `yaml :"store"`
27+ Log string `yaml :"log"`
2828 S struct {
29- Prefix string `json :"prefix"`
30- } `json :"s"`
29+ Prefix string `yaml :"prefix"`
30+ } `yaml :"s"`
3131 X struct {
32- Prefix string `json :"prefix"`
33- VCS string `json :"vcs"`
34- ImportPath string `json :"import_path"`
35- RepoPath string `json :"repo_path"`
36- } `json :"x"`
32+ Prefix string `yaml :"prefix"`
33+ VCS string `yaml :"vcs"`
34+ ImportPath string `yaml :"import_path"`
35+ RepoPath string `yaml :"repo_path"`
36+ } `yaml :"x"`
3737}
3838
3939func (c * config ) parse () {
Original file line number Diff line number Diff line change 44
55require (
66 github.com/go-redis/redis/v8 v8.0.0
7- gopkg.in/yaml.v2 v2.3.0
7+ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
88)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212 "strings"
1313)
1414
15- var xTmpl = template .Must (template .New ( "x" ). ParseFiles ("public/x.html" ))
15+ var xTmpl = template .Must (template .ParseFiles ("public/x.html" ))
1616
1717type x struct {
1818 ImportRoot string
You can’t perform that action at this time.
0 commit comments