From ba198731c2b44e5bf64401a21e32bbcd2bd07a64 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 07:47:18 +0100 Subject: [PATCH] ax(mining): replace banned fmt import with ErrUnsupportedMiner in miner_factory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fmt is a banned import (AX §banned-imports). miner_factory.go used fmt.Errorf for the unsupported-miner error path; the package already provides ErrUnsupportedMiner() in errors.go, so use that instead and drop the fmt import entirely. Co-Authored-By: Charon --- pkg/mining/miner_factory.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/mining/miner_factory.go b/pkg/mining/miner_factory.go index b6dbdff..17c70c5 100644 --- a/pkg/mining/miner_factory.go +++ b/pkg/mining/miner_factory.go @@ -1,7 +1,6 @@ package mining import ( - "fmt" "strings" "sync" ) @@ -77,7 +76,7 @@ func (f *MinerFactory) Create(minerType string) (Miner, error) { constructor, ok := f.constructors[name] if !ok { - return nil, fmt.Errorf("unsupported miner type: %s", minerType) + return nil, ErrUnsupportedMiner(minerType) } return constructor(), nil