diff --git a/buxclient.go b/buxclient.go index ede544d3..bb45bb7f 100644 --- a/buxclient.go +++ b/buxclient.go @@ -23,7 +23,6 @@ type BuxClient struct { transports.TransportService accessKey *bec.PrivateKey accessKeyString string - debug bool transport transports.TransportService transportOptions []transports.ClientOps xPriv *bip32.ExtendedKey @@ -107,17 +106,6 @@ func (b *BuxClient) SetAdminKey(adminKeyString string) error { return nil } -// SetDebug turn the debugging on or off -func (b *BuxClient) SetDebug(debug bool) { - b.debug = debug - b.transport.SetDebug(debug) -} - -// IsDebug return the debugging status -func (b *BuxClient) IsDebug() bool { - return b.transport.IsDebug() -} - // SetSignRequest turn the signing of the http request on or off func (b *BuxClient) SetSignRequest(signRequest bool) { b.transport.SetSignRequest(signRequest) diff --git a/buxclient_test.go b/buxclient_test.go index aed0c35d..4666d120 100644 --- a/buxclient_test.go +++ b/buxclient_test.go @@ -161,36 +161,6 @@ func TestSetAdminKey(t *testing.T) { }) } -// TestSetDebug will test the debug setter -func TestSetDebug(t *testing.T) { - t.Run("true", func(t *testing.T) { - client, _ := New( - WithXPriv(xPrivString), - WithHTTP(serverURL), - ) - client.SetDebug(true) - assert.True(t, client.IsDebug()) - }) - - t.Run("false", func(t *testing.T) { - client, _ := New( - WithXPriv(xPrivString), - WithHTTP(serverURL), - ) - client.SetDebug(false) - assert.False(t, client.IsDebug()) - }) - - t.Run("false", func(t *testing.T) { - _, err := New( - WithXPriv(xPrivString), - WithDebugging(false), - WithHTTP(serverURL), - ) - require.NoError(t, err) - }) -} - // TestSetSignRequest will test the sign request setter func TestSetSignRequest(t *testing.T) { t.Run("true", func(t *testing.T) { @@ -214,7 +184,6 @@ func TestSetSignRequest(t *testing.T) { t.Run("false", func(t *testing.T) { _, err := New( WithXPriv(xPrivString), - WithDebugging(false), WithHTTP(serverURL), ) require.NoError(t, err) @@ -573,7 +542,6 @@ func TestGetTransport(t *testing.T) { WithXPriv(xPrivString), WithGraphQL(serverURL), WithAdminKey(xPrivString), - WithDebugging(true), WithSignRequest(false), ) transport := client.GetTransport() diff --git a/client_options.go b/client_options.go index 3418251b..cd19fc58 100644 --- a/client_options.go +++ b/client_options.go @@ -86,12 +86,3 @@ func WithSignRequest(signRequest bool) ClientOps { } } } - -// WithDebugging will set whether to turn debugging on -func WithDebugging(debug bool) ClientOps { - return func(c *BuxClient) { - if c != nil { - c.transportOptions = append(c.transportOptions, transports.WithDebugging(debug)) - } - } -} diff --git a/examples/graphql/graphql.go b/examples/graphql/graphql.go index ad3c8f89..41ba0f77 100644 --- a/examples/graphql/graphql.go +++ b/examples/graphql/graphql.go @@ -1,30 +1,19 @@ package main import ( - "github.com/BuxOrg/go-buxclient/xpriv" - "log" - "github.com/BuxOrg/go-buxclient" + "github.com/BuxOrg/go-buxclient/xpriv" ) func main() { // Generate keys - keys, resErr := xpriv.Generate() - if resErr != nil { - log.Fatalln(resErr.Error()) - } + keys, _ := xpriv.Generate() // Create a client - buxClient, err := buxclient.New( + _, _ = buxclient.New( buxclient.WithXPriv(keys.XPriv()), buxclient.WithGraphQL("localhost:3001"), - buxclient.WithDebugging(true), buxclient.WithSignRequest(true), ) - if err != nil { - log.Fatalln(err.Error()) - } - - log.Printf("client loaded - bux debug: %v", buxClient.IsDebug()) } diff --git a/examples/http/http.go b/examples/http/http.go index c4e988c9..b44426c9 100644 --- a/examples/http/http.go +++ b/examples/http/http.go @@ -1,30 +1,19 @@ package main import ( - "github.com/BuxOrg/go-buxclient/xpriv" - "log" - "github.com/BuxOrg/go-buxclient" + "github.com/BuxOrg/go-buxclient/xpriv" ) func main() { // Generate keys - keys, resErr := xpriv.Generate() - if resErr != nil { - log.Fatalln(resErr.Error()) - } + keys, _ := xpriv.Generate() // Create a client - buxClient, err := buxclient.New( + _, _ = buxclient.New( buxclient.WithXPriv(keys.XPriv()), buxclient.WithHTTP("localhost:3001"), - buxclient.WithDebugging(true), buxclient.WithSignRequest(true), ) - if err != nil { - log.Fatalln(err.Error()) - } - - log.Printf("client loaded - bux debug: %v", buxClient.IsDebug()) } diff --git a/examples/http_with_access_key/http_with_access_key.go b/examples/http_with_access_key/http_with_access_key.go index 6e734d88..8fa3a275 100644 --- a/examples/http_with_access_key/http_with_access_key.go +++ b/examples/http_with_access_key/http_with_access_key.go @@ -1,8 +1,6 @@ package main import ( - "log" - "github.com/BuxOrg/go-buxclient" ) @@ -12,15 +10,9 @@ func main() { exampleAccessKey := "some_generated_access_key" // Create a client - client, err := buxclient.New( + _, _ = buxclient.New( buxclient.WithAccessKey(exampleAccessKey), buxclient.WithHTTP("http://localhost:3003/v1"), - buxclient.WithDebugging(true), buxclient.WithSignRequest(true), ) - if err != nil { - log.Fatalln(err.Error()) - } - - log.Printf("client loaded - bux debug: %v", client.IsDebug()) } diff --git a/examples/keys/keys.go b/examples/keys/keys.go index 23ac492f..7f533d70 100644 --- a/examples/keys/keys.go +++ b/examples/keys/keys.go @@ -12,11 +12,6 @@ func main() { panic(err) } - fmt.Println("<-- Generate method") - fmt.Println("XPriv: ", keys.XPriv()) - fmt.Println("XPub: ", keys.XPub().String()) - fmt.Println("Mnemonic: ", keys.Mnemonic()) - //Generate keys from mnemonic string xpriv3, err := xpriv.FromMnemonic(keys.Mnemonic()) if err != nil { diff --git a/examples/new_paymail/new_paymail.go b/examples/new_paymail/new_paymail.go index 013a9922..590ba0d9 100644 --- a/examples/new_paymail/new_paymail.go +++ b/examples/new_paymail/new_paymail.go @@ -2,37 +2,22 @@ package main import ( "context" - "github.com/BuxOrg/go-buxclient/xpriv" - "log" - "github.com/BuxOrg/go-buxclient" + "github.com/BuxOrg/go-buxclient/xpriv" ) func main() { // Generate keys - keys, resErr := xpriv.Generate() - if resErr != nil { - log.Fatalln(resErr.Error()) - } + keys, _ := xpriv.Generate() // Create a client - buxClient, err := buxclient.New( + buxClient, _ := buxclient.New( buxclient.WithXPriv(keys.XPriv()), buxclient.WithHTTP("localhost:3001"), - buxclient.WithDebugging(true), buxclient.WithSignRequest(true), ) - if err != nil { - log.Fatalln(err.Error()) - } - - log.Printf("client loaded - bux debug: %v", buxClient.IsDebug()) - err = buxClient.NewPaymail(context.Background(), keys.XPub().String(), "foo@domain.com", "", "Foo", nil) - if err != nil { - log.Fatalln(err.Error()) - } - log.Printf("paymail added") + _ = buxClient.NewPaymail(context.Background(), keys.XPub().String(), "foo@domain.com", "", "Foo", nil) } diff --git a/examples/register_xpub/register_xpub.go b/examples/register_xpub/register_xpub.go index fb667dc7..f980e561 100644 --- a/examples/register_xpub/register_xpub.go +++ b/examples/register_xpub/register_xpub.go @@ -2,36 +2,24 @@ package main import ( "context" - "github.com/BuxOrg/go-buxclient/xpriv" - "log" - buxmodels "github.com/BuxOrg/bux-models" "github.com/BuxOrg/go-buxclient" + "github.com/BuxOrg/go-buxclient/xpriv" ) func main() { // Generate keys - keys, resErr := xpriv.Generate() - if resErr != nil { - log.Fatalln(resErr.Error()) - } + keys, _ := xpriv.Generate() // Create a client - buxClient, err := buxclient.New( + buxClient, _ := buxclient.New( buxclient.WithXPriv(keys.XPriv()), buxclient.WithHTTP("localhost:3001"), - buxclient.WithDebugging(true), buxclient.WithSignRequest(true), ) - if err != nil { - log.Fatalln(err.Error()) - } - if err = buxClient.NewXpub( + _ = buxClient.NewXpub( context.Background(), keys.XPub().String(), &buxmodels.Metadata{"example_field": "example_data"}, - ); err != nil { - log.Fatalln(err.Error()) - } + ) - log.Println("registered xPub: " + keys.XPub().String()) } diff --git a/transports/client_options.go b/transports/client_options.go index 35512474..d9c67955 100644 --- a/transports/client_options.go +++ b/transports/client_options.go @@ -39,7 +39,6 @@ func WithGraphQL(serverURL string) ClientOps { return func(c *Client) { if c != nil { c.transport = NewTransportService(&TransportGraphQL{ - debug: c.debug, server: serverURL, signRequest: c.signRequest, adminXPriv: c.adminXPriv, @@ -57,7 +56,6 @@ func WithHTTP(serverURL string) ClientOps { return func(c *Client) { if c != nil { c.transport = NewTransportService(&TransportHTTP{ - debug: c.debug, server: serverURL, signRequest: c.signRequest, adminXPriv: c.adminXPriv, @@ -75,7 +73,6 @@ func WithGraphQLClient(serverURL string, httpClient *http.Client) ClientOps { return func(c *Client) { if c != nil { c.transport = NewTransportService(&TransportGraphQL{ - debug: c.debug, server: serverURL, signRequest: c.signRequest, adminXPriv: c.adminXPriv, @@ -93,7 +90,6 @@ func WithHTTPClient(serverURL string, httpClient *http.Client) ClientOps { return func(c *Client) { if c != nil { c.transport = NewTransportService(&TransportHTTP{ - debug: c.debug, server: serverURL, signRequest: c.signRequest, adminXPriv: c.adminXPriv, @@ -126,15 +122,3 @@ func WithSignRequest(signRequest bool) ClientOps { } } } - -// WithDebugging will set whether to turn debugging on -func WithDebugging(debug bool) ClientOps { - return func(c *Client) { - if c != nil { - c.debug = debug - if c.transport != nil { - c.transport.SetDebug(debug) - } - } - } -} diff --git a/transports/graphql.go b/transports/graphql.go index 288e4add..9c70224e 100644 --- a/transports/graphql.go +++ b/transports/graphql.go @@ -4,7 +4,6 @@ import ( "context" "encoding/hex" "encoding/json" - "log" "net/http" buxmodels "github.com/BuxOrg/bux-models" @@ -24,7 +23,6 @@ type TransportGraphQL struct { accessKey *bec.PrivateKey adminXPriv *bip32.ExtendedKey client graphQlService - debug bool httpClient *http.Client server string signRequest bool @@ -113,16 +111,6 @@ func (g *TransportGraphQL) SetAdminKey(adminKey *bip32.ExtendedKey) { g.adminXPriv = adminKey } -// SetDebug turn the debugging on or off -func (g *TransportGraphQL) SetDebug(debug bool) { - g.debug = debug -} - -// IsDebug return the debugging status -func (g *TransportGraphQL) IsDebug() bool { - return g.debug -} - // SetSignRequest turn the signing of the HTTP request on or off func (g *TransportGraphQL) SetSignRequest(signRequest bool) { g.signRequest = signRequest @@ -801,9 +789,6 @@ func (g *TransportGraphQL) draftTransactionCommon(ctx context.Context, reqBody s return nil, WrapError(err) } draftTransaction := respData.NewTransaction - if g.debug { - log.Printf("Draft transaction: %v\n", draftTransaction) - } return draftTransaction, nil } @@ -852,9 +837,6 @@ func (g *TransportGraphQL) RecordTransaction(ctx context.Context, hex, reference return nil, WrapError(err) } transaction := respData.Transaction - if g.debug { - log.Printf("transaction: %s\n", transaction.ID) - } return transaction, nil } @@ -1021,9 +1003,6 @@ func (g *TransportGraphQL) doGraphQLQuery(ctx context.Context, reqBody string, v if err := g.client.Run(ctx, req, &respData); err != nil { return WrapError(err) } - if g.debug { - log.Printf("model: %v\n", respData) - } return nil } diff --git a/transports/graphql_admin.go b/transports/graphql_admin.go index 95c068dd..1cc65187 100644 --- a/transports/graphql_admin.go +++ b/transports/graphql_admin.go @@ -2,8 +2,6 @@ package transports import ( "context" - "log" - buxmodels "github.com/BuxOrg/bux-models" "github.com/machinebox/graphql" ) @@ -508,9 +506,6 @@ func (g *TransportGraphQL) doGraphQLAdminQuery(ctx context.Context, reqBody stri if err := g.client.Run(ctx, req, &respData); err != nil { return WrapError(err) } - if g.debug { - log.Printf("model: %v\n", respData) - } return nil } @@ -551,9 +546,6 @@ func (g *TransportGraphQL) AdminRecordTransaction(ctx context.Context, hex strin return nil, WrapError(err) } transaction := respData.Transaction - if g.debug { - log.Printf("transaction: %s\n", transaction.ID) - } return transaction, nil } diff --git a/transports/http.go b/transports/http.go index 74cd17f2..9a8778ba 100644 --- a/transports/http.go +++ b/transports/http.go @@ -6,7 +6,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "log" "net/http" "strconv" @@ -22,7 +21,6 @@ import ( type TransportHTTP struct { accessKey *bec.PrivateKey adminXPriv *bip32.ExtendedKey - debug bool httpClient *http.Client server string signRequest bool @@ -35,16 +33,6 @@ func (h *TransportHTTP) Init() error { return nil } -// SetDebug turn the debugging on or off -func (h *TransportHTTP) SetDebug(debug bool) { - h.debug = debug -} - -// IsDebug return the debugging status -func (h *TransportHTTP) IsDebug() bool { - return h.debug -} - // SetSignRequest turn the signing of the http request on or off func (h *TransportHTTP) SetSignRequest(signRequest bool) { h.signRequest = signRequest @@ -94,9 +82,6 @@ func (h *TransportHTTP) DeletePaymail(ctx context.Context, paymailAddress string ); err != nil { return WrapError(err) } - if h.debug { - log.Printf("delete paymail: %v\n", paymailAddress) - } return nil } @@ -109,9 +94,6 @@ func (h *TransportHTTP) GetXPub(ctx context.Context) (*buxmodels.Xpub, ResponseE ); err != nil { return nil, err } - if h.debug { - log.Printf("xpub: %v\n", xPub) - } return &xPub, nil } @@ -131,9 +113,6 @@ func (h *TransportHTTP) UpdateXPubMetadata(ctx context.Context, metadata *buxmod ); err != nil { return nil, err } - if h.debug { - log.Printf("xpub: %v\n", xPub) - } return &xPub, nil } @@ -146,9 +125,6 @@ func (h *TransportHTTP) GetAccessKey(ctx context.Context, id string) (*buxmodels ); err != nil { return nil, err } - if h.debug { - log.Printf("access key: %v\n", accessKey) - } return &accessKey, nil } @@ -187,9 +163,6 @@ func (h *TransportHTTP) GetAccessKeysCount(ctx context.Context, conditions map[s ); err != nil { return 0, err } - if h.debug { - log.Printf("Access keys count: %v\n", count) - } return count, nil } @@ -202,9 +175,6 @@ func (h *TransportHTTP) RevokeAccessKey(ctx context.Context, id string) (*buxmod ); err != nil { return nil, err } - if h.debug { - log.Printf("access key: %v\n", accessKey) - } return &accessKey, nil } @@ -235,9 +205,6 @@ func (h *TransportHTTP) GetDestinationByID(ctx context.Context, id string) (*bux ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -250,9 +217,6 @@ func (h *TransportHTTP) GetDestinationByAddress(ctx context.Context, address str ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -265,9 +229,6 @@ func (h *TransportHTTP) GetDestinationByLockingScript(ctx context.Context, locki ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -324,9 +285,6 @@ func (h *TransportHTTP) NewDestination(ctx context.Context, metadata *buxmodels. ); err != nil { return nil, err } - if h.debug { - log.Printf("new destination: %v\n", destination) - } return &destination, nil } @@ -349,9 +307,6 @@ func (h *TransportHTTP) UpdateDestinationMetadataByID(ctx context.Context, id st ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -374,9 +329,6 @@ func (h *TransportHTTP) UpdateDestinationMetadataByAddress(ctx context.Context, ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -399,9 +351,6 @@ func (h *TransportHTTP) UpdateDestinationMetadataByLockingScript(ctx context.Con ); err != nil { return nil, err } - if h.debug { - log.Printf("destination: %v\n", destination) - } return &destination, nil } @@ -414,9 +363,6 @@ func (h *TransportHTTP) GetTransaction(ctx context.Context, txID string) (*buxmo ); err != nil { return nil, err } - if h.debug { - log.Printf("Transaction: %v\n", transaction) - } return &transaction, nil } @@ -440,9 +386,6 @@ func (h *TransportHTTP) GetTransactions(ctx context.Context, conditions map[stri ); err != nil { return nil, err } - if h.debug { - log.Printf("transactions: %d\n", len(transactions)) - } return transactions, nil } @@ -465,9 +408,6 @@ func (h *TransportHTTP) GetTransactionsCount(ctx context.Context, conditions map ); err != nil { return 0, err } - if h.debug { - log.Printf("Transactions count: %v\n", count) - } return count, nil } @@ -518,9 +458,6 @@ func (h *TransportHTTP) createDraftTransaction(ctx context.Context, ); err != nil { return nil, err } - if h.debug { - log.Printf("draft transaction: %v\n", draftTransaction) - } if draftTransaction == nil { return nil, WrapError(buxerrors.ErrDraftNotFound) } @@ -547,9 +484,6 @@ func (h *TransportHTTP) RecordTransaction(ctx context.Context, hex, referenceID ); err != nil { return nil, err } - if h.debug { - log.Printf("transaction: %s\n", transaction.ID) - } return &transaction, nil } @@ -572,9 +506,6 @@ func (h *TransportHTTP) UpdateTransactionMetadata(ctx context.Context, txID stri ); err != nil { return nil, err } - if h.debug { - log.Printf("Transaction: %v\n", transaction) - } return &transaction, nil } @@ -606,10 +537,6 @@ func (h *TransportHTTP) GetUtxo(ctx context.Context, txID string, outputIndex ui return nil, err } - if h.debug { - log.Printf("utxo: %v\n", utxo) - } - return &utxo, nil } @@ -630,9 +557,6 @@ func (h *TransportHTTP) GetUtxos(ctx context.Context, conditions map[string]inte ); err != nil { return nil, err } - if h.debug { - log.Printf("utxos: %d\n", len(utxos)) - } return utxos, nil } @@ -653,9 +577,6 @@ func (h *TransportHTTP) GetUtxosCount(ctx context.Context, conditions map[string ); err != nil { return 0, err } - if h.debug { - log.Printf("utxos count: %v\n", count) - } return count, nil } diff --git a/transports/http_admin.go b/transports/http_admin.go index b1fb0d41..cde696f5 100644 --- a/transports/http_admin.go +++ b/transports/http_admin.go @@ -3,7 +3,6 @@ package transports import ( "context" "encoding/json" - "log" "net/http" buxmodels "github.com/BuxOrg/bux-models" @@ -44,9 +43,6 @@ func (h *TransportHTTP) AdminGetStatus(ctx context.Context) (bool, ResponseError ); err != nil { return false, err } - if h.debug { - log.Printf("admin status: %v\n", status) - } return status, nil } @@ -59,9 +55,6 @@ func (h *TransportHTTP) AdminGetStats(ctx context.Context) (*buxmodels.AdminStat ); err != nil { return nil, err } - if h.debug { - log.Printf("admin stats: %v\n", stats) - } return stats, nil } @@ -138,9 +131,6 @@ func (h *TransportHTTP) AdminGetPaymail(ctx context.Context, address string) (*b ); err != nil { return nil, err } - if h.debug { - log.Printf("admin get paymail: %v\n", model) - } return model, nil } @@ -182,9 +172,6 @@ func (h *TransportHTTP) AdminCreatePaymail(ctx context.Context, xPubID string, a ); err != nil { return nil, err } - if h.debug { - log.Printf("admin create paymail: %v\n", model) - } return model, nil } @@ -204,9 +191,6 @@ func (h *TransportHTTP) AdminDeletePaymail(ctx context.Context, address string) ); err != nil { return nil, err } - if h.debug { - log.Printf("admin delete paymail: %v\n", model) - } return model, nil } @@ -285,9 +269,6 @@ func (h *TransportHTTP) adminGetModels(ctx context.Context, conditions map[strin ); err != nil { return err } - if h.debug { - log.Printf(path+": %v\n", models) - } return nil } @@ -307,9 +288,6 @@ func (h *TransportHTTP) adminCount(ctx context.Context, conditions map[string]in ); err != nil { return 0, err } - if h.debug { - log.Printf(path+": %v\n", count) - } return count, nil } @@ -329,9 +307,6 @@ func (h *TransportHTTP) AdminRecordTransaction(ctx context.Context, hex string) ); err != nil { return nil, err } - if h.debug { - log.Printf("transaction: %s\n", transaction.ID) - } return &transaction, nil } diff --git a/transports/interface.go b/transports/interface.go index e97ba171..1426627f 100644 --- a/transports/interface.go +++ b/transports/interface.go @@ -91,9 +91,7 @@ type TransportService interface { TransactionService XpubService Init() error - IsDebug() bool IsSignRequest() bool SetAdminKey(adminKey *bip32.ExtendedKey) - SetDebug(debug bool) - SetSignRequest(debug bool) + SetSignRequest(signRequest bool) } diff --git a/transports/transports.go b/transports/transports.go index b4dbfbf5..011af490 100644 --- a/transports/transports.go +++ b/transports/transports.go @@ -14,7 +14,6 @@ type Client struct { accessKey *bec.PrivateKey adminKey string adminXPriv *bip32.ExtendedKey - debug bool signRequest bool transport TransportService xPriv *bip32.ExtendedKey diff --git a/transports/transports_test.go b/transports/transports_test.go index ba9bbef9..396fc14a 100644 --- a/transports/transports_test.go +++ b/transports/transports_test.go @@ -7,39 +7,6 @@ import ( "github.com/stretchr/testify/require" ) -// TestWithDebugging will test the method WithDebugging() -func TestWithDebugging(t *testing.T) { - - t.Run("get opts", func(t *testing.T) { - opt := WithDebugging(false) - assert.IsType(t, *new(ClientOps), opt) - }) - - t.Run("debug false", func(t *testing.T) { - opts := []ClientOps{ - WithDebugging(false), - WithHTTP(""), - } - c, err := NewTransport(opts...) - require.NoError(t, err) - require.NotNil(t, c) - - assert.Equal(t, false, c.IsDebug()) - }) - - t.Run("debug true", func(t *testing.T) { - opts := []ClientOps{ - WithDebugging(true), - WithHTTP(""), - } - c, err := NewTransport(opts...) - require.NoError(t, err) - require.NotNil(t, c) - - assert.Equal(t, true, c.IsDebug()) - }) -} - // TestWithSignRequest will test the method WithSignRequest() func TestWithSignRequest(t *testing.T) { @@ -48,7 +15,7 @@ func TestWithSignRequest(t *testing.T) { assert.IsType(t, *new(ClientOps), opt) }) - t.Run("debug false", func(t *testing.T) { + t.Run("sign request false", func(t *testing.T) { opts := []ClientOps{ WithSignRequest(false), WithHTTP(""), @@ -60,7 +27,7 @@ func TestWithSignRequest(t *testing.T) { assert.Equal(t, false, c.IsSignRequest()) }) - t.Run("debug true", func(t *testing.T) { + t.Run("sign request true", func(t *testing.T) { opts := []ClientOps{ WithSignRequest(true), WithHTTP(""),