summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-10 04:22:53 -0600
committerJeff Carr <[email protected]>2025-01-10 04:22:53 -0600
commit88e4359cdec41a29750586202b15fa2dabb89e55 (patch)
tree26d39b4ac00baea9649afdb5f541d4306845361e /argv.go
parent25ae7fca5c09e41e869a2a1aeed65215e41a41f0 (diff)
cleanup as much junk as possiblev0.0.39
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go48
1 files changed, 14 insertions, 34 deletions
diff --git a/argv.go b/argv.go
index 6d496f1..7357f6b 100644
--- a/argv.go
+++ b/argv.go
@@ -10,48 +10,28 @@ var argv args
type args struct {
Package string `arg:"--package" help:"the package name"`
- // LoBase string `arg:"--lobase" help:"lowercase basename"`
- // UpBase string `arg:"--upbase" help:"uppercase basename"`
- Proto string `arg:"--proto" help:"the .proto filename"`
- Append string `arg:"--append" help:"will keep this key unique on append"`
- Sort []string `arg:"-s,--sort,separate" help:"how and what to sort on"`
- Marshal []string `arg:"--marshal" help:"what to marshal on"`
- NoMarshal bool `arg:"--no-marshal" help:"do not make a marshal.pb.go file"`
- NoSort bool `arg:"--no-sort" help:"do not make a sort.pb.go file"`
- Mutex bool `arg:"--mutex" default:"true" help:"add mutex in protoc autogen file"`
- DryRun bool `arg:"--dry-run" help:"show what would be run"`
- 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"`
+ Proto string `arg:"--proto" help:"the .proto filename"`
+ Mutex bool `arg:"--mutex" default:"true" help:"insert a mutex into protoc .pb.go file"`
+ Delete bool `arg:"--delete" help:"use delete with copy experiment"`
+ DryRun bool `arg:"--dry-run" help:"show what would be run"`
+ 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"`
}
func (a args) Description() string {
- return `
-autogenpb tries to generate a sort.pb.go file for a protobuf
+ return "autogenpb " + VERSION + " Built on " + BUILDTIME + `
-Install with:
+Auto Generate protocol buffer Sort() and Marshal() functions
- go install go.wit.com/apps/autogenpb@latest
+go install go.wit.com/apps/autogenpb@latest
-More information at:
-
- https://go.wit.com/
-
-The protobuf is assumed to have a 'standard' format.
-
-That is the .proto file:
-
-* only defines one thing and it's the same name as the file
-* uses the concept of 'plural' (like ruby on rails)
- This means, the file should be "apples.proto" and inside
- have 'message Apple' and 'message Apples'
- The "message Apples" should have a repeated Apple apples
-
-There is an example in the code:
-
- go-clone go.wit.com/apps/autogenpb
+The protobuf requires a 'standard' .proto format.
+See the git sources for an example .proto file.
`
}
+/*
func (args) Version() string {
- return "go-clone " + VERSION + " Built on " + BUILDTIME
+ return "autogenpb " + VERSION + " Built on " + BUILDTIME
}
+*/