Simplify condition with err

This commit is contained in:
bogem 2016-08-30 21:57:12 +05:00
parent d671d98363
commit 71a9c0834b

View file

@ -401,11 +401,9 @@ func writeLocalNonPersistentFlag(flag *pflag.Flag, w io.Writer) error {
format += "=" format += "="
} }
format += "\")\n" format += "\")\n"
if _, err := fmt.Fprintf(w, format, name); err != nil { _, err := fmt.Fprintf(w, format, name)
return err return err
} }
return nil
}
func writeFlags(cmd *Command, w io.Writer) error { func writeFlags(cmd *Command, w io.Writer) error {
_, err := fmt.Fprintf(w, ` flags=() _, err := fmt.Fprintf(w, ` flags=()