Documentation
¶
Overview ¶
Package settingstest serves settings sections from memory for tests. Source satisfies app/settings.Reader and app/settingswatch.Source without importing either, so tests inside app/settings can use it too. It does not decode or validate: a test stores the typed value a consumer expects to read.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source holds the sections a test stores and the change callbacks consumers register per section. The zero value is empty and ready to use.
func (*Source) Change ¶
Change stores v under section, then runs the section's callbacks outside the lock, the order the catalog's settings listener keeps: the new value is readable before any callback runs.