Skip to content

Commit 4970c73

Browse files
authored
Fix docs (#110)
1 parent 61cfc0d commit 4970c73

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

envconfig.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,11 @@ type Config struct {
269269
}
270270

271271
// 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.
272+
// [ProcessWith] for a more customizable version.
273+
//
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.
274277
func Process(ctx context.Context, i any, mus ...Mutator) error {
275278
if v, ok := i.(*Config); ok {
276279
v.Mutators = append(v.Mutators, mus...)

0 commit comments

Comments
 (0)