Implement flag "resolvers". (#24)
* Propagate errors. * Use junit test output. * Expand role of DecodeContext to include Scanner. * Inject resolved flags as Path elements in the Context. This allows all existing logic to apply seamlessly: hooks, required flags, etc. * Clarify that hooks can be called multiple times.
This commit is contained in:
committed by
Gerald Kaszuba
parent
73064a687f
commit
e9d88d6528
@@ -65,6 +65,7 @@ func TestEscapedQuote(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBareTags(t *testing.T) {
|
||||
// nolint: govet
|
||||
var cli struct {
|
||||
Cmd struct {
|
||||
Arg string `arg`
|
||||
@@ -80,6 +81,7 @@ func TestBareTags(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBareTagsWithJsonTag(t *testing.T) {
|
||||
// nolint: govet
|
||||
var cli struct {
|
||||
Cmd struct {
|
||||
Arg string `json:"-" optional arg`
|
||||
@@ -95,6 +97,7 @@ func TestBareTagsWithJsonTag(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestManySeps(t *testing.T) {
|
||||
// nolint: govet
|
||||
var cli struct {
|
||||
Arg string `arg optional default:"hi"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user