mirror of
https://github.com/spf13/cobra
synced 2024-11-13 01:07:20 +00:00
Simplify condition with err
This commit is contained in:
parent
d671d98363
commit
71a9c0834b
1 changed files with 2 additions and 4 deletions
|
@ -401,10 +401,8 @@ func writeLocalNonPersistentFlag(flag *pflag.Flag, w io.Writer) error {
|
|||
format += "="
|
||||
}
|
||||
format += "\")\n"
|
||||
if _, err := fmt.Fprintf(w, format, name); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
_, err := fmt.Fprintf(w, format, name)
|
||||
return err
|
||||
}
|
||||
|
||||
func writeFlags(cmd *Command, w io.Writer) error {
|
||||
|
|
Loading…
Reference in a new issue