X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapigen%2Fgenerate.go;h=a2f941aa4ddd2a9e873debaf8f81913eeb79605a;hb=d0b973030fe07dc7875da72f5ebe42d8bd9544b1;hp=834c989ad74909a1427ebbd21619929f188e6396;hpb=15c53e7a9da6f61448b77339b5b762ada0050aff;p=govpp.git diff --git a/binapigen/generate.go b/binapigen/generate.go index 834c989..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)]") @@ -246,6 +246,8 @@ func genAlias(g *GenFile, alias *Alias) { genAddressWithPrefixConversion(g, alias.GoName) case "mac_address": genMacAddressConversion(g, alias.GoName) + case "timestamp": + genTimestampConversion(g, alias.GoName) } }