Alias Page.Scratch to Page.Store (note)

Fixes #13016
This commit is contained in:
Bjørn Erik Pedersen
2024-11-05 16:32:57 +01:00
parent df8bd4af4f
commit 2c3efc8106
6 changed files with 35 additions and 24 deletions

View File

@@ -28,25 +28,6 @@ type Scratch struct {
mu sync.RWMutex
}
// Scratcher provides a scratching service.
type Scratcher interface {
// Scratch returns a "scratch pad" that can be used to store state.
Scratch() *Scratch
}
type scratcher struct {
s *Scratch
}
func (s scratcher) Scratch() *Scratch {
return s.s
}
// NewScratcher creates a new Scratcher.
func NewScratcher() Scratcher {
return scratcher{s: NewScratch()}
}
// Add will, for single values, add (using the + operator) the addend to the existing addend (if found).
// Supports numeric values and strings.
//