aboutsummaryrefslogtreecommitdiffstats
path: root/binapigen/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'binapigen/run.go')
-rw-r--r--binapigen/run.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/binapigen/run.go b/binapigen/run.go
index d3a181a..5a1059a 100644
--- a/binapigen/run.go
+++ b/binapigen/run.go
@@ -25,13 +25,14 @@ import (
"github.com/sirupsen/logrus"
- "git.fd.io/govpp.git/binapigen/vppapi"
+ "go.fd.io/govpp/binapigen/vppapi"
)
type Options struct {
- OutputDir string // output directory for generated files
- ImportPrefix string // prefix for import paths
- NoVersionInfo bool // disables generating version info
+ OutputDir string // output directory for generated files
+ ImportPrefix string // prefix for import paths
+ NoVersionInfo bool // disables generating version info
+ NoSourcePathInfo bool // disables the 'source: /path' comment
}
func Run(apiDir string, filesToGenerate []string, opts Options, f func(*Generator) error) {
@@ -42,7 +43,7 @@ func Run(apiDir string, filesToGenerate []string, opts Options, f func(*Generato
}
func run(apiDir string, filesToGenerate []string, opts Options, fn func(*Generator) error) error {
- apifiles, err := vppapi.ParseDir(apiDir)
+ apiFiles, err := vppapi.ParseDir(apiDir)
if err != nil {
return err
}
@@ -52,10 +53,10 @@ func run(apiDir string, filesToGenerate []string, opts Options, fn func(*Generat
if err != nil {
return fmt.Errorf("cannot resolve import path for output dir %s: %w", opts.OutputDir, err)
}
- logrus.Infof("resolved import path prefix: %s", opts.ImportPrefix)
+ logrus.Debugf("resolved import path prefix: %s", opts.ImportPrefix)
}
- gen, err := New(opts, apifiles, filesToGenerate)
+ gen, err := New(opts, apiFiles, filesToGenerate)
if err != nil {
return err
}
@@ -72,7 +73,6 @@ func run(apiDir string, filesToGenerate []string, opts Options, fn func(*Generat
return err
}
}
-
if err = gen.Generate(); err != nil {
return err
}