ax(mining): replace restatement comments on settings structs with usage examples

AX Principle 2 — comments must show HOW with real values, not restate WHAT
the type already says. WindowState, MinerDefaults and AppSettings all had
prose descriptions ("stores…") replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 13:02:37 +01:00
parent 11f19c41b1
commit fedb0317bc
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -12,7 +12,8 @@ import (
const settingsFileName = "settings.json"
// WindowState stores the last window position and size
// state := settingsManager.GetWindowState()
// if state.Maximized { w.SetSize(state.Width, state.Height) }
type WindowState struct {
X int `json:"x"`
Y int `json:"y"`
@ -21,7 +22,7 @@ type WindowState struct {
Maximized bool `json:"maximized"`
}
// MinerDefaults stores default configuration for miners
// settingsManager.SetMinerDefaults(MinerDefaults{DefaultPool: "pool.minexmr.com:4444", CPUMaxThreadsHint: 50})
type MinerDefaults struct {
DefaultPool string `json:"defaultPool,omitempty"`
DefaultWallet string `json:"defaultWallet,omitempty"`
@ -30,7 +31,8 @@ type MinerDefaults struct {
CPUThrottleThreshold int `json:"cpuThrottleThreshold,omitempty"` // Throttle when CPU exceeds this %
}
// AppSettings stores application-wide settings
// settings := settingsManager.Get()
// if settings.Theme == "dark" { applyDarkMode() }
type AppSettings struct {
// Window settings
Window WindowState `json:"window"`