Bot releases are hidden (Show)
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v1.0.2...v1.0.3
Published by sethvargo 5 months ago
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v1.0.1...v1.0.2
Published by sethvargo 8 months ago
Published by sethvargo 10 months ago
[!CAUTION]
This release includes breaking changes. Please read these release notes thoroughly.
Introduce global and cascading configuration options by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/97
This introduces the concept of global configurations and cascades struct-level configuration options onto all child fields. For example, marking a struct as required will mark all child fields as required. Similarly, setting a custom delimiter on a struct tag propagates that delimiter to all child fields of the struct. This behavior previously only applied to the
noinit
tag, but it now applies to all tags.
Change MutatorFunc
to be more flexible by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/92 and https://github.com/sethvargo/go-envconfig/pull/94
⚠️ BREAKING! This changes the signature of the
MutatorFunc
to have more information about prior states. It will include the original environment variable names and values, as well as the currently resolved values. Additionally, the mutation chain can now be stopped without returning an error.
Require Go 1.21 or later by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/93
⚠️ BREAKING! The new minimum required Go version is 1.21.
Drop ExtractDefaults
functionality by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/95
⚠️ BREAKING! This removes the
ExtractDefaults
function. It was rarely used and resulted in extraneous processing. Users who depended on this functionality can callProcessWith
an emptyMapLookuper
(which is allExtractDefaults
did anyway).
Ignore prefix computing environment variable defaults by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/99
⚠️ BREAKING! Computing the default value for an environment variable when the default value is another environment variable will ignore any prefixes on the current lookuper. See https://github.com/sethvargo/go-envconfig/pull/85 for more information.
Allow configurable decoding by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/100
⚠️ BREAKING! Envconfig no longer runs decoders or mutators on unset values. To restore the old behavior, add the
decodeunset
struct field annotation or pass theDefaultDecodeUnset
configuration option as true. See https://github.com/sethvargo/go-envconfig/pull/100 for more information.
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.9.0...v1.0.0-beta1
Published by sethvargo 10 months ago
[!CAUTION]
This release includes breaking changes to prepare for the 1.0 release. Please read these release notes thoroughly and report any bugs or issues. Many of these "breaking changes" are fixing what should have been the correct behavior from the start.
Introduce global and cascading configuration options by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/97
This introduces the concept of global configurations and cascades struct-level configuration options onto all child fields. For example, marking a struct as required will mark all child fields as required. Similarly, setting a custom delimiter on a struct tag propagates that delimiter to all child fields of the struct. This behavior previously only applied to the
noinit
tag, but it now applies to all tags.
Change MutatorFunc
to be more flexible by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/92 and https://github.com/sethvargo/go-envconfig/pull/94
⚠️ BREAKING! This changes the signature of the
MutatorFunc
to have more information about prior states. It will include the original environment variable names and values, as well as the currently resolved values. Additionally, the mutation chain can now be stopped without returning an error.
Require Go 1.21 or later by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/93
⚠️ BREAKING! The new minimum required Go version is 1.21.
Drop ExtractDefaults
functionality by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/95
⚠️ BREAKING! This removes the
ExtractDefaults
function. It was rarely used and resulted in extraneous processing. Users who depended on this functionality can callProcessWith
an emptyMapLookuper
(which is allExtractDefaults
did anyway).
Ignore prefix computing environment variable defaults by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/99
⚠️ BREAKING! Computing the default value for an environment variable when the default value is another environment variable will ignore any prefixes on the current lookuper. See https://github.com/sethvargo/go-envconfig/pull/85 for more information.
Allow configurable decoding by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/100
⚠️ BREAKING! Envconfig no longer runs decoders or mutators on unset values. To restore the old behavior, add the
decodeunset
struct field annotation or pass theDefaultDecodeUnset
configuration option as true. See https://github.com/sethvargo/go-envconfig/pull/100 for more information.
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.9.0...v1.0.0-beta1
Published by sethvargo over 1 year ago
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.8.3...v0.9.0
Published by sethvargo about 2 years ago
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.8.1...v0.8.2
Published by sethvargo about 2 years ago
noinit
from parent fields by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/67
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.8.0...v0.8.1
Published by sethvargo over 2 years ago
The previous implementation of overwrite
would always overwrite values in the given struct, even if values existed. While this is the definition of overwrite
, it unintentionally extended to default
values as well. So even if a value was explicitly set on a struct, it would be overwritten with the "default" value set in envconfig. This was an unexpected behavior, since defaults should take the lowest precedence.
The new implementation has the following behavior with overwrite
:
If the struct field has the zero value and a default is set:
If no environment variable is specified, the struct field will be populated with the default value.
If an environment variable is specified, the struct field will be populate with the environment variable value.
If the struct field has a non-zero value and a default is set:
If no environment variable is specified, the struct field's existing value will be used (the default is ignored).
If an environment variable is specified, the struct field's existing value will be overwritten with the environment variable value.
As part of this change, decoder interfaces are only processed when an environment (or a default) is present.
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.7.0...v0.8.0
Published by sethvargo over 2 years ago
Change custom unmarshaling order by @gust1n in https://github.com/sethvargo/go-envconfig/pull/59. This changes the order of resolution for unmarshalling to:
envconfig.Decoder
encoding.TextUnmarshaler
json.Unmarshaler
encoding.BinaryUnmarshaler
gob.GobDecoder
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.6.2...v0.7.0
Published by sethvargo over 2 years ago
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.6.1...v0.6.2
Published by sethvargo over 2 years ago
noinit
to all pointer fields by @sethvargo in https://github.com/sethvargo/go-envconfig/pull/55
Full Changelog: https://github.com/sethvargo/go-envconfig/compare/v0.6.0...v0.6.1