Registry / cli / alexflint-go-arg

alexflint-go-arg

JSON →
library1.6.1gogounverified

Parses command-line arguments into struct fields using struct tags.

go get github.com/alexflint/go-arg
INSTALL
IMPORT
SIG · ALEXFLINT-GO-ARG
A
alexflint-go-arg
cligov1.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

arg
github.com/alexflint/go-arg

Defines and parses command-line arguments using a struct.

package main import ( "fmt" "github.com/alexflint/go-arg" ) var args struct { Name string `arg:"-n" help:"Your name"` } func main() { arg.MustParse(&args) fmt.Printf("Hello %s\n", args.Name) }
Debug
Known issues
breakingThe `arg` tag syntax changed in v1.0; older versions used different conventions.
fix
Use the current tag format as shown in the documentation.
affects: <1.0.0
Upgrade
Version history
1.6.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
22
Perplexity
1
OpenAI (training)
1
Resources