You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support go tool invocation in write directive
The new -write_tool_generate_directive works the same way as the
-write_generate_directive flag, except that it correctly regenerates
"go tool mockgen" invocations of the mockgen tool.
destination=flag.String("destination", "", "Output file; defaults to stdout.")
60
-
mockNames=flag.String("mock_names", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.")
61
-
packageOut=flag.String("package", "", "Package of the generated code; defaults to the package of the input with a 'mock_' prefix.")
62
-
selfPackage=flag.String("self_package", "", "The full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. This can happen if the mock's package is set to one of its inputs (usually the main one) and the output is stdio so mockgen cannot detect the final output package. Setting this flag will then tell mockgen which import to exclude.")
63
-
writeCmdComment=flag.Bool("write_command_comment", true, "Writes the command used as a comment if true.")
64
-
writePkgComment=flag.Bool("write_package_comment", true, "Writes package documentation comment (godoc) if true.")
65
-
writeSourceComment=flag.Bool("write_source_comment", true, "Writes original file (source mode) or interface names (package mode) comment if true.")
66
-
writeGenerateDirective=flag.Bool("write_generate_directive", false, "Add //go:generate directive to regenerate the mock")
67
-
copyrightFile=flag.String("copyright_file", "", "Copyright file used to add copyright header")
68
-
buildConstraint=flag.String("build_constraint", "", "If non-empty, added as //go:build <constraint>")
destination=flag.String("destination", "", "Output file; defaults to stdout.")
60
+
mockNames=flag.String("mock_names", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.")
61
+
packageOut=flag.String("package", "", "Package of the generated code; defaults to the package of the input with a 'mock_' prefix.")
62
+
selfPackage=flag.String("self_package", "", "The full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. This can happen if the mock's package is set to one of its inputs (usually the main one) and the output is stdio so mockgen cannot detect the final output package. Setting this flag will then tell mockgen which import to exclude.")
63
+
writeCmdComment=flag.Bool("write_command_comment", true, "Writes the command used as a comment if true.")
64
+
writePkgComment=flag.Bool("write_package_comment", true, "Writes package documentation comment (godoc) if true.")
65
+
writeSourceComment=flag.Bool("write_source_comment", true, "Writes original file (source mode) or interface names (package mode) comment if true.")
66
+
writeGenerateDirective=flag.Bool("write_generate_directive", false, "Add //go:generate directive to regenerate the mock")
67
+
writeToolGenerateDirective=flag.Bool("write_tool_generate_directive", false, "Add //go:generate directive to regenerate the mock, for indirect \"go tool mockgen\" invocation")
68
+
copyrightFile=flag.String("copyright_file", "", "Copyright file used to add copyright header")
69
+
buildConstraint=flag.String("build_constraint", "", "If non-empty, added as //go:build <constraint>")
0 commit comments