File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,20 @@ func LoadConf(dir string) *Configure {
7373 Rules []Rule `yaml:"rules"`
7474 CodeDir string `yaml:"codedir"`
7575 }
76+ cfg .ID = "unset"
77+ cfg .Server = "127.0.0.1:6154"
78+ cfg .SSL .Enabled = false
79+ cfg .SSL .Insecure = false
80+ cfg .Dashboard .Enabled = true
81+ cfg .Dashboard .Listen = "0.0.0.0"
82+ cfg .Dashboard .Port = 8080
83+ cfg .Secret = "0123456789"
84+ cfg .Link .ReadTimeout = time .Second
85+ cfg .Link .WriteTimeout = time .Second
86+ cfg .Log .Dir = "./logs"
87+ cfg .Log .Size = 50 * 1024 * 1024
88+ cfg .Log .Rotate = 7
89+ cfg .CodeDir = "./code"
7690 runtime .Assert (yaml .Decode (dir , & cfg ))
7791 for i , t := range cfg .Rules {
7892 switch t .Type {
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ func LoadConf(dir string) *Configure {
4343 Crt string `yaml:"crt"`
4444 } `yaml:"tls"`
4545 }
46+ cfg .Listen = 6154
47+ cfg .Secret = "0123456789"
48+ cfg .Link .ReadTimeout = time .Second
49+ cfg .Link .WriteTimeout = time .Second
50+ cfg .Log .Dir = "./logs"
51+ cfg .Log .Size = 50 * 1024 * 1024
52+ cfg .Log .Rotate = 7
4653 runtime .Assert (yaml .Decode (dir , & cfg ))
4754 if ! filepath .IsAbs (cfg .Log .Dir ) {
4855 dir , err := os .Executable ()
You can’t perform that action at this time.
0 commit comments