Skip to main content
Load a struct from a file, a directory, or a slice. otter-settings uses the same save path when you click Apply.

Single file

loadWithMetadata returns file size and mtime_ns for hot-reload bookkeeping. loadFromSlice parses embedded or in-memory content:
loadOrCreate loads an existing file or writes defaults on first run.

Directory loading

loadWithOverrides merges a system directory with user overrides by filename.

Serialization

otter-settings uses save when the user applies changes.

LoadOptions

Errors

LoadError covers I/O (FileNotFound, MmapFailed, FileTooLarge). ParseError covers syntax (UnterminatedString, InvalidNumber, ArrayTooLarge).