Skip to content

Commit

Permalink
remove useless variable declarations (#1330)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxiao-zhao committed Feb 4, 2022
1 parent 175bb87 commit 1bf639b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions flag_string.go
Expand Up @@ -90,10 +90,7 @@ func (c *Context) String(name string) string {
func lookupString(name string, set *flag.FlagSet) string {
f := set.Lookup(name)
if f != nil {
parsed, err := f.Value.String(), error(nil)
if err != nil {
return ""
}
parsed := f.Value.String()
return parsed
}
return ""
Expand Down

0 comments on commit 1bf639b

Please sign in to comment.