forked from kelseyhightower/envconfig
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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
Fixes #54 Thank you @marcosnils!
Rearrangement of related test output per: https://github.com/golang/go/wiki/CodeReviewComments#useful-test-failures
* 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
awesome, thanks @cassidykelly!
) 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our version of
envconfig
does not support env mapping which was added tokelseyhightower/envconfig
in release 1.3.0.