mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #3150 from gouyang/master
pkg/mflag: add modified flag package
This commit is contained in:
commit
5e3dc31e6f
@ -137,7 +137,6 @@ func NewConfig() *config {
|
||||
fs := cfg.FlagSet
|
||||
fs.Usage = func() {
|
||||
fmt.Println(usageline)
|
||||
fmt.Println(flagsline)
|
||||
}
|
||||
|
||||
// member
|
||||
@ -225,6 +224,7 @@ func (cfg *config) Parse(arguments []string) error {
|
||||
switch perr {
|
||||
case nil:
|
||||
case flag.ErrHelp:
|
||||
fmt.Println(flagsline)
|
||||
os.Exit(0)
|
||||
default:
|
||||
os.Exit(2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user