Skip to content

Commit

Permalink
Generate variation id for percentage options in configcattest package
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Apr 11, 2024
1 parent 3a409be commit 162ba44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions configcattest/flag.go
Expand Up @@ -117,11 +117,12 @@ func (f *Flag) entry(key string) (*configcat.Setting, error) {
})
}
if len(f.Percentages) > 0 {
for _, p := range f.Percentages {
for i, p := range f.Percentages {
e.TargetingRules = append(e.TargetingRules, &configcat.TargetingRule{
PercentageOptions: []*configcat.PercentageOption{{
Percentage: p.Percentage,
Value: &configcat.SettingValue{Value: p.Value},
Percentage: p.Percentage,
Value: &configcat.SettingValue{Value: p.Value},
VariationID: fmt.Sprintf("v%d_%s", i, key),
}},
})
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
@@ -1,3 +1,3 @@
package configcat

const version = "9.0.5"
const version = "9.0.6"

0 comments on commit 162ba44

Please sign in to comment.