Skip to content

Commit 28fe19b

Browse files
authored
Merge pull request #2850 from makelarisjr/issue-2849
govc: Use unique searchFlagKey when calling NewSearchFlag
2 parents 4d874f4 + 515ca29 commit 28fe19b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

govc/flags/search.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ type SearchFlag struct {
5454
isset bool
5555
}
5656

57-
var searchFlagKey = flagKey("search")
58-
5957
func NewSearchFlag(ctx context.Context, t int) (*SearchFlag, context.Context) {
58+
searchFlagKey := flagKey(fmt.Sprintf("search%d", t))
59+
6060
if v := ctx.Value(searchFlagKey); v != nil {
6161
return v.(*SearchFlag), ctx
6262
}

0 commit comments

Comments
 (0)