Skip to content

Commit

Permalink
govc: Use unique searchFlagKey when calling NewSearchFlag
Browse files Browse the repository at this point in the history
Closes: #2849
  • Loading branch information
makelarisjr committed May 18, 2022
1 parent ecf7a0b commit 515ca29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions govc/flags/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ type SearchFlag struct {
isset bool
}

var searchFlagKey = flagKey("search")

func NewSearchFlag(ctx context.Context, t int) (*SearchFlag, context.Context) {
searchFlagKey := flagKey(fmt.Sprintf("search%d", t))

if v := ctx.Value(searchFlagKey); v != nil {
return v.(*SearchFlag), ctx
}
Expand Down

0 comments on commit 515ca29

Please sign in to comment.