Skip to content

Commit 9abcc48

Browse files
zamicolgopherbot
authored andcommitted
flag: remove "// BUG" comment
Remove a vestigial " // BUG" comment as there is no bug in the relevant code section and comment predated other changes. Also removed a needless allocation and conformed to the "v, ok := a[x]" standard convention. Tests are passing. Change-Id: Id28ad1baf77447052b54b341f018e573bac0c11a GitHub-Last-Rev: 2608469 GitHub-Pull-Request: #56210 Reviewed-on: https://go-review.googlesource.com/c/go/+/442815 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Rob Pike <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 3d92205 commit 9abcc48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/flag/flag.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1056,9 +1056,9 @@ func (f *FlagSet) parseOne() (bool, error) {
10561056
break
10571057
}
10581058
}
1059-
m := f.formal
1060-
flag, alreadythere := m[name] // BUG
1061-
if !alreadythere {
1059+
1060+
flag, ok := f.formal[name]
1061+
if !ok {
10621062
if name == "help" || name == "h" { // special case for nice help message.
10631063
f.usage()
10641064
return false, ErrHelp

0 commit comments

Comments
 (0)