kelseyhightower / envconfig

Golang library for managing configuration data from environment variables
MIT License
5.01k stars 377 forks source link

Support for Multiple Tags? (Both required and split_words) #120

Closed medyagh closed 6 years ago

medyagh commented 6 years ago

It doesn't seem like it supports more than one tag for a field

I tried the followings and it doesnt seem to work,

with semicolon

type config struct {
myfield1 string `required:"true";split_words:"true"`
}

with comma

type config struct {
myfield1 string `required:"true",split_words:"true"`
}

I tried with colon

type config struct {
myfield1 string `required:"true":split_words:"true"`
}

Am I missing something or is it not supported?

medyagh commented 6 years ago

ah ! it was space !

for people with same problem here this works for me

type config struct {
myfield1 string `required:"true" split_words:"true"`
}