Why is not options passed when calling GetVariant?
erichall opened this issue · 1 comments
erichall commented
Hi
I've encountered an issue when trying to use variants.
When calling GetVariant
I do it like this:
unleash.GetVariant("feature-name", ucontext.Context{
UserId: "user-id"
Properties: map[string]string{
"foo": "bar",
},
})
So then, inside the unleash sdk, client.go
, this line is executed
func (uc *Client) GetVariant(feature string, options ...VariantOption) *api.Variant {
defaultVariant := api.GetDefaultVariant()
if !uc.isEnabled(feature) {
return defaultVariant;
}
When calling uc.isEnabled(feature)
no options are passed. This causes my own defined Properties foo
be lost and ultimately I only get the disabled variant back.
My question: Why are not the options passed to isEnabled?
Version of Unleash: github.com/Unleash/unleash-client-go/v3 v3.2.3
ivarconr commented
It looks like bug.
/cc @FredrikOseberg