Skip to content

Commit

Permalink
Change 'number' to 'int' input on number variations
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmcconkey committed Jul 7, 2022
1 parent 3d83f1a commit 36b8608
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions evaluation/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ func (e Evaluator) IntVariation(identifier string, target *Target, defaultValue

// NumberVariation returns number evaluation for target
func (e Evaluator) NumberVariation(identifier string, target *Target, defaultValue float64) float64 {

variation, err := e.evaluate(identifier, target, "number")
//all numbers are stored as ints in the database
variation, err := e.evaluate(identifier, target, "int")
if err != nil {
e.logger.Errorf("Error while evaluating number flag '%s', err: %v", identifier, err)
return defaultValue
Expand Down
4 changes: 2 additions & 2 deletions evaluation/evaluator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ var (
Variation: &heavyWeight,
},
Variations: numberVariations,
Kind: "number",
Kind: "int",
},
org: {
Feature: org,
Expand Down Expand Up @@ -173,7 +173,7 @@ var (
Value: invalidNumberValue,
},
},
Kind: "number",
Kind: "int",
},
invalidJSON: {
Feature: invalidJSON,
Expand Down

0 comments on commit 36b8608

Please sign in to comment.