Convert Option to an interface and make Vars a map conforming to the interface.

This commit is contained in:
Alec Thomas
2018-07-03 22:56:22 +10:00
parent b2cab08684
commit 1f1e9d0f0f
7 changed files with 44 additions and 35 deletions
+2 -2
View File
@@ -520,11 +520,11 @@ func TestInterpolationIntoModel(t *testing.T) {
}
_, err := kong.New(&cli)
require.Error(t, err)
p, err := kong.New(&cli, kong.Vars(map[string]string{
p, err := kong.New(&cli, kong.Vars{
"default": "Some default value.",
"somebody": "chickens!",
"enum": "a,b,c,d",
}))
})
require.NoError(t, err)
flag := p.Model.Flags[1]
flag2 := p.Model.Flags[2]