Skip to content

Commit

Permalink
govc: Use unique searchFlagKey when calling NewSearchFlag
Browse files Browse the repository at this point in the history
Closes: vmware#2849
  • Loading branch information
makelarisjr committed May 17, 2022
1 parent ecf7a0b commit ad37515
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions govc/flags/search.go
Expand Up @@ -57,6 +57,8 @@ type SearchFlag struct {
var searchFlagKey = flagKey("search")

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

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

0 comments on commit ad37515

Please sign in to comment.