aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/binapi-generator/types.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-06-06 14:08:48 +0200
committerOndrej Fabry <ofabry@cisco.com>2019-06-06 14:08:48 +0200
commitc4522fe10317b1729a0820dc880afc78c663f64d (patch)
tree3c370f285b3d00feb5857ca155f7e46ae8765f7f /cmd/binapi-generator/types.go
parent0ff02b6b1f0757f5e4c011457757bd18d0a60f01 (diff)
Add various generator improvements
- generate service implementation for modules - generate conversion maps and String() method for enums - generate module name and version as constants - rename Union_data field to XXX_UnionData for consistency - generate constant GoVppAPIPackageIsVersionN for checking compatibility with API - add example for using service clients - add some documentation to socketclient adapter - cleanup gen.go file used for generating binapi - regenerate binapi with latest VPP release (19.04.1) - change global variables Messages into a function AllMessages Change-Id: Id1ef97764570759eaa3e5a4dc14ecda7a168ee39 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'cmd/binapi-generator/types.go')
-rw-r--r--cmd/binapi-generator/types.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/binapi-generator/types.go b/cmd/binapi-generator/types.go
index d056251..90c890f 100644
--- a/cmd/binapi-generator/types.go
+++ b/cmd/binapi-generator/types.go
@@ -18,6 +18,8 @@ import (
"fmt"
"strconv"
"strings"
+
+ "github.com/sirupsen/logrus"
)
// toApiType returns name that is used as type reference in VPP binary API
@@ -62,7 +64,7 @@ func convertToGoType(ctx *context, binapiType string) (typ string) {
typ = binapiType
default:
// fallback type
- log.Warnf("found unknown VPP binary API type %q, using byte", binapiType)
+ logrus.Warnf("found unknown VPP binary API type %q, using byte", binapiType)
typ = "byte"
}
}