alexflint / go-arg

Struct-based argument parsing in Go
https://pkg.go.dev/github.com/alexflint/go-arg
BSD 2-Clause "Simplified" License
2.04k stars 100 forks source link

Fix crash on errors in package-level `MustParse` #255

Closed hhromic closed 4 months ago

hhromic commented 4 months ago

This simple PR adds a test case for the package-level MustParse for invalid structs and fixes a crash that occurs in this case.

Fixes #254

alexflint commented 4 months ago

Good lord, thanks for catching this!