go-arg icon indicating copy to clipboard operation
go-arg copied to clipboard

Struct-based argument parsing in Go

Results 45 go-arg issues
Sort by recently updated
recently updated
newest added

#### Combined arguments are convenience to use. e.g., `ps -ef`, `rm -rf`. #### go-arg test code ```go package main import ( "fmt" "github.com/alexflint/go-arg" ) func main() { var args struct...

I love the design of this library. However I could not find any information about generating completion scripts from the reflected CLI. This would be a fantastic addition!

v2-planned

So I have this struct I've defined: ```go type JSONValue[T any] struct { val T } func (v *JSONValue[T]) Get() T { return v.val } func (v *JSONValue[T]) UnmarshalText(data []byte)...

Now ignores if the short argument is empty, so we can only accept the environment variable. I notice that test: `TestInvalidShortFlag` breaks, but it seems this test was done thinking...

This should be possible to allow certain parameters to be only passed via env: ```go type args struct { AuthKey string `arg:"required,--,-,env:FOO_AUTH_KEY"` } ``` I could try to do a...

As a I user I would like to generate custom usage and help strings for a command. It would be possible to achieve this by exposing immutable command specs. It...

I can do something like -h -h -h and this is treated as a single -h rather than as an error. Yet -hhhh is treated as an error. Closely related,...

v2-ideas

I was tryng to make this library behave more closely to the behavior of the rust clap crate. They are similar in the way they present command line options, but...