diff options
author | Vladimir Lavor <vlavor@cisco.com> | 2021-02-01 14:37:26 +0100 |
---|---|---|
committer | Vladimir Lavor <vlavor@cisco.com> | 2021-02-02 14:40:06 +0100 |
commit | 4c1cccf48cd144414c7233f167087aff770ef67b (patch) | |
tree | 438adc0792f03c00b1b06cc1d0ce05c8cb5841ff /binapigen/generate.go | |
parent | c0c73d34a7f5eae44e7c9230ddccc0cfcb201084 (diff) |
binapigen: added enumflags type
Change-Id: I2f46504bd05862e415dab518fad349d08aedf919
Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Diffstat (limited to 'binapigen/generate.go')
-rw-r--r-- | binapigen/generate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binapigen/generate.go b/binapigen/generate.go index bf6df81..a2f941a 100644 --- a/binapigen/generate.go +++ b/binapigen/generate.go @@ -178,7 +178,7 @@ func genEnum(g *GenFile, enum *Enum) { g.P(")") g.P() - if isEnumFlag(enum) { + if enum.IsFlag || isEnumFlag(enum) { size := BaseTypeSizes[enum.Type] * 8 g.P("func (x ", enum.GoName, ") String() string {") g.P(" s, ok := ", enum.GoName, "_name[", gotype, "(x)]") |