Skip to content

Commit

Permalink
Fix docs (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed May 16, 2024
1 parent 61cfc0d commit 4970c73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ type Config struct {
}

// Process decodes the struct using values from environment variables. See
// [ProcessWith] for a more customizable version. If *Config is provided for i,
// [ProcessWith] is called using the *Config with mus appended.
// [ProcessWith] for a more customizable version.
//
// As a special case, if the input for the target is a [*Config], then this
// function will call [ProcessWith] using the provided config, with any mutation
// appended.
func Process(ctx context.Context, i any, mus ...Mutator) error {
if v, ok := i.(*Config); ok {
v.Mutators = append(v.Mutators, mus...)
Expand Down

0 comments on commit 4970c73

Please sign in to comment.