ax(mining): replace prose comment on UninstallMiner with usage examples

AX Principle 2: comments show HOW with real values, not WHAT the function does.
"stops, uninstalls, and removes" restates the signature — replaced with
concrete call examples showing both miner types.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:41:49 +01:00
parent 0e31a6e99a
commit 2a43c0a39f
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -325,8 +325,8 @@ func (m *Manager) StartMiner(ctx context.Context, minerType string, config *Conf
return miner, nil
}
// UninstallMiner stops, uninstalls, and removes a miner's configuration.
// The context can be used to cancel the operation.
// manager.UninstallMiner(ctx, "xmrig") // stops all xmrig instances and removes config
// manager.UninstallMiner(ctx, "ttminer") // stops all ttminer instances and removes config
func (m *Manager) UninstallMiner(ctx context.Context, minerType string) error {
// Check for cancellation before acquiring lock
select {