From cdbbf1252110c9ac2fd5da7c090570946594a58f Mon Sep 17 00:00:00 2001 From: Dan Markham Date: Thu, 18 Jul 2019 08:06:39 -0700 Subject: [PATCH] Port fix from @ltpquang --- enumer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enumer.go b/enumer.go index d73440c..8f92f58 100644 --- a/enumer.go +++ b/enumer.go @@ -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)