main
kzkzzzz 2024-06-23 13:26:48 +08:00
parent abce1f5c8d
commit f17cf17e4f
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,9 @@ var (
)
func LoadFlag() {
if !pflag.Parsed() {
pflag.Parse()
}
err := vp.BindPFlags(pflag.CommandLine)
if err != nil {
panic(fmt.Errorf("load command line fail: %s", err))