From 8c5a0382f9bf842c32310de50ffbffd455a41b6b Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Wed, 23 Aug 2023 11:04:54 -0400 Subject: [PATCH] fix: imports were not gci compliant --- chainstate/broadcast_providers.go | 4 ++-- chainstate/client.go | 4 ++-- chainstate/client_options.go | 4 ++-- chainstate/interface.go | 2 +- client_options.go | 6 +++--- mock_chainstate_test.go | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/chainstate/broadcast_providers.go b/chainstate/broadcast_providers.go index 87d31252..3cfd677f 100644 --- a/chainstate/broadcast_providers.go +++ b/chainstate/broadcast_providers.go @@ -4,9 +4,9 @@ import ( "context" "errors" "fmt" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" "strings" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" "github.com/mrz1836/go-nownodes" "github.com/tonicpow/go-minercraft/v2" ) @@ -177,7 +177,7 @@ func broadcastWithBroadcastClient(ctx context.Context, client ClientInterface, t result, err := client.BroadcastClient().SubmitTransaction(ctx, &tx) if err != nil { debugLog(client, txID, "error broadcast request for "+ProviderBroadcastClient+" failed: "+err.Error()) - return nil + return nil //nolint:nilerr // err is being reported but not returned } debugLog(client, txID, "result broadcast request for "+ProviderBroadcastClient+" blockhash: "+result.BlockHash+" status: "+result.TxStatus.String()) diff --git a/chainstate/client.go b/chainstate/client.go index fe040fc2..c2189b53 100644 --- a/chainstate/client.go +++ b/chainstate/client.go @@ -3,12 +3,12 @@ package chainstate import ( "context" "fmt" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" - broadcastClient "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" "sync" "time" "github.com/BuxOrg/bux/utils" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" + broadcastClient "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" "github.com/libsv/go-bt/v2" zLogger "github.com/mrz1836/go-logger" "github.com/mrz1836/go-nownodes" diff --git a/chainstate/client_options.go b/chainstate/client_options.go index e5cec019..712fee7e 100644 --- a/chainstate/client_options.go +++ b/chainstate/client_options.go @@ -2,10 +2,10 @@ package chainstate import ( "context" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" - broadcastClient "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" "time" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" + broadcastClient "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" zLogger "github.com/mrz1836/go-logger" "github.com/mrz1836/go-nownodes" "github.com/mrz1836/go-whatsonchain" diff --git a/chainstate/interface.go b/chainstate/interface.go index b74c43b7..20d20f9a 100644 --- a/chainstate/interface.go +++ b/chainstate/interface.go @@ -2,11 +2,11 @@ package chainstate import ( "context" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" "net/http" "time" "github.com/BuxOrg/bux/utils" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" "github.com/centrifugal/centrifuge-go" "github.com/libsv/go-bc" "github.com/mrz1836/go-nownodes" diff --git a/client_options.go b/client_options.go index c1d7c35e..a1286416 100644 --- a/client_options.go +++ b/client_options.go @@ -3,8 +3,6 @@ package bux import ( "context" "database/sql" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" - broadcast_client "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" "net/http" "strings" "time" @@ -13,6 +11,8 @@ import ( "github.com/BuxOrg/bux/cluster" "github.com/BuxOrg/bux/notifications" "github.com/BuxOrg/bux/taskmanager" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" + broadcastclient "github.com/bitcoin-sv/go-broadcast-client/broadcast/broadcast-client" "github.com/coocood/freecache" "github.com/go-redis/redis/v8" "github.com/mrz1836/go-cache" @@ -755,7 +755,7 @@ func WithBroadcastClient(broadcastClient broadcast.Client) ClientOps { } // WithBroadcastClientAPIs will set broadcast client APIs -func WithBroadcastClientAPIs(apis []broadcast_client.ArcClientConfig) ClientOps { +func WithBroadcastClientAPIs(apis []broadcastclient.ArcClientConfig) ClientOps { return func(c *clientOptions) { c.chainstate.options = append(c.chainstate.options, chainstate.WithBroadcastClientAPIs(apis)) } diff --git a/mock_chainstate_test.go b/mock_chainstate_test.go index b6d59c1e..ca9eefeb 100644 --- a/mock_chainstate_test.go +++ b/mock_chainstate_test.go @@ -2,11 +2,11 @@ package bux import ( "context" - "github.com/bitcoin-sv/go-broadcast-client/broadcast" "time" "github.com/BuxOrg/bux/chainstate" "github.com/BuxOrg/bux/utils" + "github.com/bitcoin-sv/go-broadcast-client/broadcast" "github.com/mrz1836/go-nownodes" "github.com/mrz1836/go-whatsonchain" "github.com/tonicpow/go-minercraft/v2"