Recognize stat_dir_type_empty
[govpp.git] / binapigen / generate.go
index 834c989..a2f941a 100644 (file)
@@ -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)
        }
 }