summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-14 17:23:28 -0500
committerJeff Carr <[email protected]>2025-10-14 17:23:28 -0500
commitb7c2f78414f1b7113d4f760b81b51d7b6758ea35 (patch)
tree40fe3cc827ee7d88e19a19667292df419f52c4b0 /argv.go
parentc182558c57fcc02314dbb109b8e515c37a8e00a9 (diff)
run only on os.Stat(). hopefully helps go generatev0.5.24
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/argv.go b/argv.go
index 5f6615b..909df65 100644
--- a/argv.go
+++ b/argv.go
@@ -25,11 +25,13 @@ type args struct {
Regret bool `arg:"--regret" help:"ignore needed UUID. You will eventually regret this."`
Delete bool `arg:"--delete" help:"use delete with copy experiment"`
DryRun bool `arg:"--dry-run" help:"check the .proto syntax, but don't do anything"`
- Format bool `arg:"--format" help:"format the .proto file and exit"`
+ ReFormat bool `arg:"--reformat" help:"reformat the .proto file and exit"`
Debug bool `arg:"--debug" help:"enable debugging information"`
Comments bool `arg:"--format-comments" help:"enforce parseable comments in a .proto file"`
NoFormat bool `arg:"--no-format" help:"do not auto-reformat the .proto file"`
Renumber bool `arg:"--renumber" help:"renumber everything. obviously breaks backwards compatiblity"`
+ Clean bool `arg:"--clean" help:"clean out any *pb.go files; bypassing ctime sanity checks"`
+ Ctime bool `arg:"--ctime" help:"do os.Stat() createtime sanity checks"`
GoSrc string `arg:"--go-src" help:"default is ~/go/src. could be set to your go.work path"`
GoPath string `arg:"--gopath" help:"the gopath of this repo"`
Identify string `arg:"--identify" help:"identify file"`
@@ -64,13 +66,17 @@ func (args) Appname() string {
return ARGNAME
}
+func (args) MatchClean() string {
+ return "foo.proto bar.proto"
+}
+
func (args) Buildtime() (string, string) {
return BUILDTIME, VERSION
}
func (a args) DoAutoComplete(pb *prep.Auto) {
if pb.Cmd == "" {
- pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--renumber", "--delete", "--dry-run", "--version"})
+ pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--renumber", "--reformat", "--delete", "--dry-run"})
} else {
pb.SubCommand(pb.Goargs...)
}