We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61cfc0d commit 4970c73Copy full SHA for 4970c73
envconfig.go
@@ -269,8 +269,11 @@ type Config struct {
269
}
270
271
// Process decodes the struct using values from environment variables. See
272
-// [ProcessWith] for a more customizable version. If *Config is provided for i,
273
-// [ProcessWith] is called using the *Config with mus appended.
+// [ProcessWith] for a more customizable version.
+//
274
+// As a special case, if the input for the target is a [*Config], then this
275
+// function will call [ProcessWith] using the provided config, with any mutation
276
+// appended.
277
func Process(ctx context.Context, i any, mus ...Mutator) error {
278
if v, ok := i.(*Config); ok {
279
v.Mutators = append(v.Mutators, mus...)
0 commit comments