kelseyhightower / envconfig

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

Using absolute paths as default value doesn't work #94

Closed 0x7061 closed 7 years ago

0x7061 commented 7 years ago

I have a string field with an absolute path as the default value, running envconfig.Process() fills it with an empty string.

Example:

type Paths struct {
    Foo string `default:"/Applications/one/two/tree/"`
    Bar string `default:"./output/"`
}

Foo is empty after processing, while Bar is naturally filled with ./output/. It seems like the starting slash is the culprit.

Any hints?

0x7061 commented 7 years ago

My bad, I've been using the wrong path.