diff options
Diffstat (limited to 'common/maps/scratch.go')
-rw-r--r-- | common/maps/scratch.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/maps/scratch.go b/common/maps/scratch.go index 638377216..cf5231783 100644 --- a/common/maps/scratch.go +++ b/common/maps/scratch.go @@ -22,7 +22,13 @@ import ( "github.com/gohugoio/hugo/common/math" ) -// Scratch is a writable context used for stateful operations in Page/Node rendering. +type StoreProvider interface { + // Store returns a Scratch that can be used to store temporary state. + // Store is not reset on server rebuilds. + Store() *Scratch +} + +// Scratch is a writable context used for stateful build operations type Scratch struct { values map[string]any mu sync.RWMutex |