added support for string type
[govpp.git] / cmd / binapi-generator / definitions.go
index 0176278..b8c3393 100644 (file)
@@ -34,16 +34,17 @@ func getBinapiTypeSize(binapiType string) int {
 
 // binapiTypes is a set of types used VPP binary API for translation to Go types
 var binapiTypes = map[string]string{
-       "bool": "bool",
-       "u8":   "uint8",
-       "i8":   "int8",
-       "u16":  "uint16",
-       "i16":  "int16",
-       "u32":  "uint32",
-       "i32":  "int32",
-       "u64":  "uint64",
-       "i64":  "int64",
-       "f64":  "float64",
+       "bool":   "bool",
+       "u8":     "uint8",
+       "i8":     "int8",
+       "u16":    "uint16",
+       "i16":    "int16",
+       "u32":    "uint32",
+       "i32":    "int32",
+       "u64":    "uint64",
+       "i64":    "int64",
+       "f64":    "float64",
+       "string": "string",
 }
 
 func usesInitialism(s string) string {