diff --git a/mockgen/mockgen.go b/mockgen/mockgen.go index e19be97..a359c3c 100644 --- a/mockgen/mockgen.go +++ b/mockgen/mockgen.go @@ -295,7 +295,8 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac } g.p("//") g.p("// Generated by this command:") - g.p("// %v", strings.Join(os.Args, " ")) + // only log the name of the executable, not the full path + g.p("// %v", strings.Join(append([]string{filepath.Base(os.Args[0])}, os.Args[1:]...), " ")) // Get all required imports, and generate unique names for them all. im := pkg.Imports()