Documentation
¶
Overview ¶
Package store is a simple persistent key/value store backed by a JSON file in the app data directory. It is pure Go and works identically on every target (desktop, mobile, server) — no native provider, no permission, no build tag. Values are stored as raw JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAppName ¶ added in v0.9.0
func SetAppName(name string)
SetAppName names the directory the default store lives in: <UserConfigDir>/<appName>/store.json. App.New calls this with Config.AppID (falling back to Title).
Without it every goleo app on a machine shared ONE store.json under "goleo-app" — two different apps read and clobbered each other's keys. Call it before the first Default(), which App.New does; afterwards the path is fixed for the process.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a concurrency-safe JSON-file-backed key/value store.