ax(mining): replace banned errors.New with ErrUnsupportedMiner in ttminer
Remove the banned `errors` import from ttminer.go. The single call to errors.New is replaced with the existing ErrUnsupportedMiner constructor from errors.go, which carries the OS name, HTTP status, and a details note about CUDA requirements. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
b6a2fb626e
commit
dfe3255abb
1 changed files with 1 additions and 2 deletions
|
|
@ -2,7 +2,6 @@ package mining
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
|
@ -109,7 +108,7 @@ func (m *TTMiner) Install() error {
|
|||
// Linux version - uses .tar.gz
|
||||
url = fmt.Sprintf("https://github.com/TrailingStop/TT-Miner-release/releases/download/%s/TT-Miner-%s.tar.gz", version, version)
|
||||
default:
|
||||
return errors.New("TT-Miner is only available for Windows and Linux (requires CUDA)")
|
||||
return ErrUnsupportedMiner(runtime.GOOS).WithDetails("TT-Miner requires CUDA; only Windows and Linux are supported")
|
||||
}
|
||||
|
||||
if err := m.InstallFromURL(url); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue