Stop when help action is called
This commit is contained in:
parent
718ab5073e
commit
7d00226118
1 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,11 @@ func (self *Config) Parse() error {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
showHelp, _ := self.Parser.Flags().GetBool("help")
|
||||
if showHelp {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if err := viper.Unmarshal(&self); err != nil {
|
||||
panic("Unable to unmarshal config")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue