Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/nuget/openfeature/provider_tests/…
Browse files Browse the repository at this point in the history
…dotnet-integration-tests/FluentAssertions-6.12.2
  • Loading branch information
thomaspoignant authored Nov 11, 2024
2 parents d4ea504 + 4e4b60d commit c77b3e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/utils/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ func Hash(s string) uint32 {
}

// BuildHash is building the hash based on the different properties of the evaluation.
func BuildHash(flagName string, bucketingKey string, max uint32) uint32 {
// this is not supposed to happen, but to avoid a crash if max is 0 we are returning 0
if max == uint32(0) {
func BuildHash(flagName string, bucketingKey string, maxPercentage uint32) uint32 {
// this is not supposed to happen, but to avoid a crash if maxPercentage is 0 we are returning 0
if maxPercentage == uint32(0) {
return uint32(0)
}
return Hash(flagName+bucketingKey) % max
return Hash(flagName+bucketingKey) % maxPercentage
}
2 changes: 1 addition & 1 deletion website/static/sdk-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"maven":{"sdk":"1.12.2","providerKt":"0.1.0","providerJava":"0.3.0","android":"0.3.0"},"npm":{"core":"1.5.0","webSDK":"1.3.2","providerServer":"0.7.3","providerWeb":"0.2.1"},"pypi":{"sdk":"0.7.2","provider":"0.2.1"},"nuget":{"sdk":"2.0.0","provider":"0.2.0"},"go":{"provider":"v0.2.1","sdk":"v1.13.1"}}
{"maven":{"sdk":"1.12.2","providerKt":"0.1.0","providerJava":"0.3.0","android":"0.3.0"},"npm":{"core":"1.5.0","serverSDK":"1.16.2","providerServer":"0.7.3","providerWeb":"0.2.1"},"pypi":{"sdk":"0.7.2","provider":"0.2.1"},"nuget":{"sdk":"2.0.0","provider":"0.2.0"},"go":{"provider":"v0.2.1","sdk":"v1.13.1"}}

0 comments on commit c77b3e9

Please sign in to comment.