Skip to content

Commit

Permalink
make ci lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
levisyin committed Dec 18, 2023
1 parent 934601d commit 50291d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,9 @@ func (c *Command) ParseFlags(args []string) error {
// if flag has been parsed, we should reset flags' value to default
if c.Flags().Parsed() {
c.Flags().Visit(func(f *flag.Flag) {
f.Value.Set(f.DefValue)
if err := f.Value.Set(f.DefValue); err != nil {
c.PrintErrf("reset argument[%s] value error %v", f.Name, err)
}
})
}
err := c.Flags().Parse(args)
Expand Down

0 comments on commit 50291d1

Please sign in to comment.