]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tpl/partial: Consolidate GoDoc
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 4 Mar 2023 21:04:01 +0000 (22:04 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 4 Mar 2023 21:04:01 +0000 (22:04 +0100)
tpl/partials/partials.go

index 26ce0f5c66de66cd5a41da5bc2271fa3b2e8c570..32f86b3322cf72e2a9bf34475e74be4810bb5fdb 100644 (file)
@@ -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()