ax(mining): replace prose comments with usage examples in settings_manager

Three comments restated the function/type name in prose (AX principle 2
violation). Replaced with concrete call-site examples showing real usage.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:56:40 +01:00
parent 9a38c8d547
commit ddfd62b8ce
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -58,7 +58,8 @@ type AppSettings struct {
Theme string `json:"theme"` // "light", "dark", "system"
}
// DefaultSettings returns sensible defaults for app settings
// settings := DefaultSettings()
// settings.Theme = "dark"
func DefaultSettings() *AppSettings {
return &AppSettings{
Window: WindowState{
@ -85,14 +86,16 @@ func DefaultSettings() *AppSettings {
}
}
// SettingsManager handles loading and saving app settings
// sm, err := NewSettingsManager()
// settings := sm.Get()
type SettingsManager struct {
mu sync.RWMutex
settings *AppSettings
settingsPath string
}
// NewSettingsManager creates a new settings manager
// sm, err := NewSettingsManager()
// if err != nil { return err }
func NewSettingsManager() (*SettingsManager, error) {
settingsPath, err := xdg.ConfigFile(filepath.Join("lethean-desktop", settingsFileName))
if err != nil {