X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=cmd%2Fbinapi-generator%2Fgenerate.go;h=715836dceb7fd3adeb2c33244d9d6dd6e49d8634;hb=d372b4efe26650dbc83908ca0bbee38d90aed3e9;hp=a8de5d545eda99937b534f72b0c24a37cbd4d90b;hpb=2c419b100f5f90c1215617d0fac81fa6749c4d6b;p=govpp.git diff --git a/cmd/binapi-generator/generate.go b/cmd/binapi-generator/generate.go index a8de5d5..715836d 100644 --- a/cmd/binapi-generator/generate.go +++ b/cmd/binapi-generator/generate.go @@ -36,8 +36,6 @@ const ( inputFileExt = ".api.json" // file extension of the VPP API files outputFileExt = ".ba.go" // file extension of the Go generated files - govppApiImportPath = "git.fd.io/govpp.git/api" // import path of the govpp API package - constModuleName = "ModuleName" // module name constant constAPIVersion = "APIVersion" // API version constant constVersionCrc = "VersionCrc" // version CRC constant @@ -244,11 +242,12 @@ func generateHeader(ctx *context, w io.Writer) { func generateImports(ctx *context, w io.Writer) { fmt.Fprintln(w, "import (") - fmt.Fprintf(w, "\tapi \"%s\"\n", govppApiImportPath) - fmt.Fprintf(w, "\tbytes \"%s\"\n", "bytes") - fmt.Fprintf(w, "\tcontext \"%s\"\n", "context") - fmt.Fprintf(w, "\tio \"%s\"\n", "io") - fmt.Fprintf(w, "\tstrconv \"%s\"\n", "strconv") + fmt.Fprintln(w, ` "bytes"`) + fmt.Fprintln(w, ` "context"`) + fmt.Fprintln(w, ` "io"`) + fmt.Fprintln(w, ` "strconv"`) + fmt.Fprintln(w) + fmt.Fprintf(w, "\tapi \"%s\"\n", "git.fd.io/govpp.git/api") fmt.Fprintf(w, "\tstruc \"%s\"\n", "github.com/lunixbochs/struc") if len(ctx.packageData.Imports) > 0 { fmt.Fprintln(w)