diff options
| author | Jeff Carr <[email protected]> | 2024-11-29 11:08:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-29 11:08:11 -0600 |
| commit | 28daefa6c53c0586baf773c2042e3a8bd5b68288 (patch) | |
| tree | 731ad1c7eda9995e82199af99d3428c246b98acf /argv.go | |
| parent | 6e29eb786218374aff0de2b7c188e1a2faa9e28e (diff) | |
add argv
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -0,0 +1,46 @@ +package main + +/* + this parses the command line arguements + + this enables command line options from other packages like 'gui' and 'log' +*/ + +var argv args + +type args struct { + Base string `arg:"--base" help:"basename"` + Proto string `arg:"--proto" help:"the .proto filename"` +} + +func (a args) Description() string { + return ` +autogenpb tries to generate a sort.pb.go file for a protobuf + +Install with: + + 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 +` +} + +func (args) Version() string { + return "go-clone " + VERSION + " Built on " + BUILDTIME +} |
