All notable changes to this project will be documented in this file. The format is based on Keep a Changelog.
Note that I update this changelog as I make changes, so the top version (right below this description) is likely unreleased.
- make
warg.GoldenTest
useGoldenTestArgs
andParseOpt
s
- make
warg.GoldenTest
acceptParseOpt
s instead of a hardcoded list of options
command.Context
:Version
,AppName
,Path
fields. Justification: I want to pass these fields to OpenTelemetry instarghaze
.command.Context.Context
field: Justification: I want to smuggle mocks into mycommand.Action
s when testing. Before, this, I added an ugly "mock selection" flag, and this is much cleaner.
- move
warg.ParseResult.Path
tocommand.Context.Path
. - rm
warg.AddVersionCommand()
in favor ofwarg.VersionCommand()
. Use withsection.ExistingCommand("version", warg.VersionCommand()),
. Justification: more declarative - I'd like to define all commands inside the root section instead of having another way to add a flag as a warg option. - rm
warg.AddColorFlag()
in favor ofwarg.ColorFlag()
. Use withsection.ExistingFlag("--color", warg.ColorFlag()),
. Same justification aswarg.VersionCommand()
. - update
Parse()
to useParseOpt
s instead of positional args:OverrideArgs
,OverrideLookupFunc
. Justification: these have obvious defaults that only need overriding for tests, which also probably want to use otherParseOpt
s. - move
warg.OverrideStderr
andwarg.OverrideStdout
to beParseOpt
s instead ofAppOpt
s. Justification: This removes the need for these public fields inApp
and nicer for callers.
- Fix YAML config parsing for
value.Dict
- Fix panic when using a
value.Dict
and callingdetailed.DetailedCommandHelp
contained.Addr
andcontained.AddrPort
flag.UnsetSentinel
to allow for unsetting flagsvalue.Dict
containerwarg.GoldenTest