themalkolm / venom

🐍 Make viper and cobra more venomous!
MIT License
2 stars 0 forks source link

Support trivial type conversion for default values #6

Closed themalkolm closed 7 years ago

themalkolm commented 7 years ago

WORKS

type Foo struct {
    bar string `flag:"bar,bananza,Barness"`
}

DOESN'T WORK

type Bar string
type Foo struct {
    bar Bar `flag:"bar,bananza,Barness"`
}

While it is still a string, it works only in the first case.