mirror of https://github.com/dmarkham/enumer.git
Fix error when number of runs reaches the run threshold
This commit is contained in:
parent
814e4e4ad4
commit
275c2734c9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue