summaryrefslogtreecommitdiffstats
path: root/cmd/binapi-generator/generate.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2018-08-22 06:07:04 +0200
committerOndrej Fabry <ofabry@cisco.com>2018-08-22 06:07:04 +0200
commit892683bef86cacc2ccda2b4df2b079171bd92164 (patch)
treebb27f2abca3b1998ac808874d4759ff81b9c83dc /cmd/binapi-generator/generate.go
parent08ddeac03fd3832d44a3dfb48ee85ecd95d2b388 (diff)
Show VPPApiError value always and remove RegisterBinAPITypes for mock adapter
Change-Id: I3b216748df1a372f25cc94e3df5d7b1b2b7a8a40 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'cmd/binapi-generator/generate.go')
-rw-r--r--cmd/binapi-generator/generate.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/binapi-generator/generate.go b/cmd/binapi-generator/generate.go
index e29c84d..33ab614 100644
--- a/cmd/binapi-generator/generate.go
+++ b/cmd/binapi-generator/generate.go
@@ -181,6 +181,7 @@ func generateHeader(ctx *context, w io.Writer) {
fmt.Fprintf(w, "\t%s\n", filepath.Base(ctx.inputFile))
fmt.Fprintln(w)
fmt.Fprintln(w, "It contains these VPP binary API objects:")
+
var printObjNum = func(obj string, num int) {
if num > 0 {
if num > 1 {
@@ -194,6 +195,7 @@ func generateHeader(ctx *context, w io.Writer) {
printObjNum("enum", len(ctx.packageData.Enums))
printObjNum("union", len(ctx.packageData.Unions))
printObjNum("service", len(ctx.packageData.Services))
+
fmt.Fprintln(w, "*/")
fmt.Fprintf(w, "package %s\n", ctx.packageName)
fmt.Fprintln(w)