Port fix from @ltpquang

This commit is contained in:
Dan Markham 2019-07-18 08:06:39 -07:00
parent 1467a49eb3
commit cdbbf12521
No known key found for this signature in database
GPG Key ID: 80673ED3335C219F
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ func (g *Generator) buildBasicExtras(runs [][]Value, typeName string, runsThresh
g.Printf(stringNameToValueMethod, typeName) g.Printf(stringNameToValueMethod, typeName)
g.Printf(stringValuesMethod, typeName) g.Printf(stringValuesMethod, typeName)
g.Printf(stringsMethod, typeName) g.Printf(stringsMethod, typeName)
if len(runs) < runsThreshold { if len(runs) <= runsThreshold {
g.Printf(stringBelongsMethodLoop, typeName) g.Printf(stringBelongsMethodLoop, typeName)
} else { // There is a map of values, the code is simpler then } else { // There is a map of values, the code is simpler then
g.Printf(stringBelongsMethodSet, typeName) g.Printf(stringBelongsMethodSet, typeName)