remove --help
This commit is contained in:
parent
6fd5111300
commit
9f26d1cf29
8
flag.go
8
flag.go
|
@ -139,10 +139,10 @@ func NewFVSet(v interface{}) (*FVSet, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flags.BoolFunc("help", "Show help", func(s string) error {
|
// flags.BoolFunc("help", "Show help", func(s string) error {
|
||||||
flags.Usage()
|
// flags.Usage()
|
||||||
return nil
|
// return nil
|
||||||
})
|
// })
|
||||||
return &FVSet{
|
return &FVSet{
|
||||||
Name: name,
|
Name: name,
|
||||||
Value: &v,
|
Value: &v,
|
||||||
|
|
|
@ -15,6 +15,6 @@ func main() {
|
||||||
}
|
}
|
||||||
sargs := &targs{}
|
sargs := &targs{}
|
||||||
v, _ := command.NewFVSet(sargs)
|
v, _ := command.NewFVSet(sargs)
|
||||||
v.Parse(os.Args[1:])
|
err := v.Parse(os.Args[1:])
|
||||||
fmt.Println(sargs)
|
fmt.Println(sargs, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue