From d4d3b9c6fa67fe454f8d8adc7502b3b645ecab10 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 18 Mar 2020 08:52:42 +0100 Subject: Release 0.3.0 - regenerate examples/binapi for latest VPP from stable/2001 - add import-prefix flag to set custom prefix (fallbacks to using go list) Change-Id: Ib09f134cf9662e348be2575448964de2b9e5c1ee Signed-off-by: Ondrej Fabry --- cmd/binapi-generator/main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/binapi-generator/main.go') diff --git a/cmd/binapi-generator/main.go b/cmd/binapi-generator/main.go index e0e2f08..8bf765b 100644 --- a/cmd/binapi-generator/main.go +++ b/cmd/binapi-generator/main.go @@ -41,6 +41,7 @@ var ( includeServices = flag.Bool("include-services", true, "Include RPC service api and client implementation.") includeComments = flag.Bool("include-comments", false, "Include JSON API source in comments for each object.") includeBinapiNames = flag.Bool("include-binapi-names", false, "Include binary API names in struct tag.") + importPrefix = flag.String("import-prefix", "", "Define import path prefix to be used to import types.") continueOnError = flag.Bool("continue-onerror", false, "Continue with next file on error.") debugMode = flag.Bool("debug", os.Getenv("GOVPP_DEBUG") != "", "Enable debug mode.") @@ -179,6 +180,7 @@ func generateFromFile(inputFile, outputDir string, typesPkgs []*context) error { ctx.includeComments = *includeComments ctx.includeBinapiNames = *includeBinapiNames ctx.includeServices = *includeServices + ctx.importPrefix = *importPrefix // read API definition from input file ctx.inputData, err = ioutil.ReadFile(ctx.inputFile) -- cgit 1.2.3-korg