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

Allow environment only arg

Open IljaN opened this issue 3 years ago • 1 comments

This should be possible to allow certain parameters to be only passed via env:

type args struct { 
    AuthKey string  `arg:"required,--,-,env:FOO_AUTH_KEY"`
}

I could try to do a PR if wanted.

IljaN avatar Mar 05 '22 03:03 IljaN

Yes that seems reasonable. PR would be much appreciated @IljaN

alexflint avatar Mar 05 '22 03:03 alexflint