ax(mining): replace prose comment on StopMiner with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 2 — comments show HOW with real values, not what the
signature already says. Prose restating the method signature deleted;
concrete call examples with realistic miner names substituted.

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

View file

@ -405,9 +405,8 @@ func (m *Manager) updateMinerConfig(minerType string, autostart bool, config *Co
})
}
// StopMiner stops a running miner and removes it from the manager.
// If the miner is already stopped, it will still be removed from the manager.
// The context can be used to cancel the operation.
// manager.StopMiner(ctx, "xmrig/monero")
// manager.StopMiner(ctx, "ttminer/rtx4090") // still removes if already stopped
func (m *Manager) StopMiner(ctx context.Context, name string) error {
// Check for cancellation before acquiring lock
select {