mirror of https://github.com/dmarkham/enumer.git
Port fix from @ltpquang
This commit is contained in:
parent
1467a49eb3
commit
cdbbf12521
|
@ -76,7 +76,7 @@ func (g *Generator) buildBasicExtras(runs [][]Value, typeName string, runsThresh
|
|||
g.Printf(stringNameToValueMethod, typeName)
|
||||
g.Printf(stringValuesMethod, typeName)
|
||||
g.Printf(stringsMethod, 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