From 4970c731215c860629c93a17dd892d86ea68e689 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 16 May 2024 17:18:02 -0400 Subject: [PATCH] Fix docs (#110) --- envconfig.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/envconfig.go b/envconfig.go index 247e61d..edc6319 100644 --- a/envconfig.go +++ b/envconfig.go @@ -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...)