Go Arg Versions Save

Struct-based argument parsing in Go

v1.5.0

1 month ago
  • Argument structs can define Description() and Epilogue(), which are added to the usage string

  • Subcommands can have multiple aliases like this:

var args struct {
    Remove *struct{} `arg:"subcommand:remove|rm|r" help:"remove something from somewhere"`
}
  • Improves formatting of usage string when the placeholder tag is set to empty string

  • Do not handle --version when the args struct lacks a Version() function

  • Add StructSubcommands to Config struct

v1.4.3

2 years ago
  • Correctly brackets non-required positional arguments in usage strings
  • Fixes help and usage strings for subcommands.
  • Add native support for url.URL via go-scalar
  • Add environment variables names to error messages when relevant

v1.4.2

3 years ago

This patch release fixes a regression in which unexported embedded structs were mistakenly being ignored.

v1.4.1

3 years ago

Minor fix for case where an environment variable containing an empty string is parsed into a slice or map.

v1.4.0

3 years ago

v1.3.0

4 years ago
  • Added the placeholder tag
  • Improved usage strings when using subcommands
  • Improved documentation on using subcommands

v1.2.0

4 years ago

This version introduces a new way to specify default values for arguments. The old way still works too.

v1.1.0

4 years ago

This version adds support for subcommands. See https://github.com/alexflint/go-arg#subcommands

v1.0.0

5 years ago

go-arg has now been stable for ~2 years, so I am releasing version 1.0. This coincides with the migration to the new go module system in #70.