Skip to content

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

@yaziine

Description

@yaziine

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions