Skip to content

Commit

Permalink
Fix error when number of runs reaches the run threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
ltpquang committed Jul 18, 2019
1 parent 814e4e4 commit 275c273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (g *Generator) buildBasicExtras(runs [][]Value, typeName string, runsThresh
// Print the basic extra methods
g.Printf(stringNameToValueMethod, typeName)
g.Printf(stringValuesMethod, typeName)
if len(runs) < runsThreshold {
if len(runs) <= runsThreshold {
g.Printf(stringBelongsMethodLoop, typeName)
} else { // There is a map of values, the code is simpler then
g.Printf(stringBelongsMethodSet, typeName)
Expand Down

0 comments on commit 275c273

Please sign in to comment.