ax(mining): replace prose comment on StopMiner with usage example
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:
parent
db124cff82
commit
d6c684df4c
1 changed files with 2 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue