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

Update axiomzen/envconfig to kelseyhightower/envconfig's latest master #1

Closed
wants to merge 48 commits into from

Conversation

evscott
Copy link

@evscott evscott commented Jun 19, 2019

Our version of envconfig does not support env mapping which was added to kelseyhightower/envconfig in release 1.3.0.

teepark and others added 30 commits August 11, 2016 12:58
- for pointers to structs, create an instance if nil
- for other pointers, leave them alone unless the env var exists
- also: resolve full PREFIX_PARENT_CHILD names
* Add support for encoding.TextUnmarshaler

With encoding.TextUnmarshaler support while decoding into the fields, some
types from the standard library start being supported (such as time.Time and
net.IP).

Resolves #58

* Update docs to add TextUnmarshaler support
In some sittuations we would like to know exactly what caused the ParseError in
a specific field. With this change the error message from ParseError would
be different (with an extra details section):

    envconfig.Process: assigning TEST_VAR1 to var1: converting 'hello' to type int. details: strconv.ParseInt: parsing "hello": invalid syntax
* using build tags to allow for os.LookupEnv in >=go1.5

* swapping build tags

* changing to only use os.LookupEnv for appengine
* Support auto-splitting camelcased words

* Update docs for multi_var support

* Fix bugs w/fieldName vs key vs alt vs ftype.Name

Thanks @relistan!
In the case of a spec like:

```
type Env struct {
	Thing
	Height: int
}

type Thing struct {
	Name: string
}

env := new(Env)
envconfig.MustProcess("prefix", &env)
```

the program wouldn't do anything with a PREFIX_THING variable, so
Process() doesn't need it, and Usage() shouldn't show it either.
* support maps with "key1:val1,key2:val2" syntax

* quote the invalid string in error msgs

* document map support in the README

closes #70
ingve and others added 18 commits March 4, 2018 15:50
)

go1.10 caches env var accesses, but only when using `os.LookupEnv`
(`syscall.Getenv` does not record env var accesses so cache seems
reusable even if env vars have changed)

fixes #107
…e regexp compilation. (#115)

Benchmark result:

goos: linux
goarch: amd64
pkg: github.com/kelseyhightower/envconfig

benchmark                 old ns/op     new ns/op     delta
BenchmarkGatherInfo-4     756307        535401        -29.21%

benchmark                 old allocs     new allocs     delta
BenchmarkGatherInfo-4     349            251            -28.08%

benchmark                 old bytes     new bytes     delta
BenchmarkGatherInfo-4     64467         15425         -76.07%
Add go 1.10.x & 1.11.x version for travis CI
Added an empty go.mod file.
@evscott evscott closed this Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.