Documentation
¶
Overview ¶
Package settings persists small cross-device user settings as a JSON map (key to value) in the state directory. The file is read and written through on every call, so several serve processes sharing the state dir see each other's changes and a fresh process picks up the latest values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the file-backed settings map. Safe for concurrent use.
func (*Store) Delete ¶
Delete takes the key out of the file, which is not the same as storing an empty value: a setting whose empty value is a real choice reads as set afterwards, and Lookup is what tells the two apart. Removing it is what puts a setting back to "never answered", so whatever the code calls its default applies again, including a default a later version changes.