update
This commit is contained in:
@@ -11,6 +11,9 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func LoadFlag() {
|
func LoadFlag() {
|
||||||
|
if !pflag.Parsed() {
|
||||||
|
pflag.Parse()
|
||||||
|
}
|
||||||
err := vp.BindPFlags(pflag.CommandLine)
|
err := vp.BindPFlags(pflag.CommandLine)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("load command line fail: %s", err))
|
panic(fmt.Errorf("load command line fail: %s", err))
|
||||||
|
|||||||
Reference in New Issue
Block a user