Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag help generation doesn't handle []string type #51

Open
yaziine opened this issue Nov 27, 2018 · 0 comments
Open

Flag help generation doesn't handle []string type #51

yaziine opened this issue Nov 27, 2018 · 0 comments
Labels

Comments

@yaziine
Copy link

yaziine commented Nov 27, 2018

I have a struct with a field which is a []string but when I call the help flag I have a wrong type and a wrong default value:

type Etcd struct {
    Endpoints []string `config:"etcd-endpoints"`
}

var etcd Etcd
etcd.Endpoints = []string{"127.0.0.1:2379"}

The help output:

$> bin -h
Usage of bin:
  -etcd-endpoints value
    	 (default etcd-endpoints)
@yaziine yaziine added the bug label Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant