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

AX Principle 2 — comments must show HOW with real values, not restate
what the signature already says.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:15:55 +01:00
parent 32290b839b
commit 649f57e91e
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -229,8 +229,7 @@ func findAvailablePort() (int, error) {
return listener.Addr().(*net.TCPAddr).Port, nil
}
// StartMiner starts a new miner and saves its configuration.
// The context can be used to cancel the operation.
// miner, err := manager.StartMiner(ctx, "xmrig", &mining.Config{Algo: "rx/0"})
func (m *Manager) StartMiner(ctx context.Context, minerType string, config *Config) (Miner, error) {
// Check for cancellation before acquiring lock
select {