summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-03-04 22:04:01 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-03-04 22:04:01 +0100
commitf56ce01ae1a3e5b399410ea8876ebc7321204edd (patch)
tree87cf4acf120759fcef6a13ba33271ad8c4eb63da
parent3bbeb5688c4452a336af07be1e8cec44dac7d6ce (diff)
tpl/partial: Consolidate GoDoc
-rw-r--r--tpl/partials/partials.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/tpl/partials/partials.go b/tpl/partials/partials.go
index 26ce0f5c6..32f86b332 100644
--- a/tpl/partials/partials.go
+++ b/tpl/partials/partials.go
@@ -129,9 +129,7 @@ func (ns *Namespace) Include(ctx context.Context, name string, contextList ...an
}
func (ns *Namespace) includWithTimeout(ctx context.Context, name string, dataList ...any) includeResult {
- // There are situation where the ctx we pass on to the partial lives longer than
- // the partial itself. For example, when the partial returns the result from reosurces.ExecuteAsTemplate.
- // Because of that, create a completely new context here.
+ // Create a new context with a timeout not connected to the incoming context.
timeoutCtx, cancel := context.WithTimeout(context.Background(), ns.deps.Timeout)
defer cancel()