feat: 重构配置层,添加 json 支持

This commit is contained in:
Mmx233
2023-08-28 22:03:03 +08:00
parent 2a098e00dd
commit 6f283a93f5
19 changed files with 318 additions and 272 deletions

View File

@@ -0,0 +1,26 @@
package flags
import (
"flag"
)
var (
// Path 配置文件路径
Path string
Interface string
Debug bool
AutoAcid bool
Acid string
)
func init() {
flag.StringVar(&Path, "config", "Config.yaml", "config path")
flag.StringVar(&Interface, "interface", "", "specify the eth name")
flag.BoolVar(&Debug, "debug", false, "enable debug mode")
flag.BoolVar(&AutoAcid, "auto-acid", false, "auto detect acid")
flag.StringVar(&Acid, "acid", "", "specify acid value")
flag.Parse()
}