Skip to content

Commit

Permalink
fix(SPV-000): fixes lint errors (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmkowalski authored Aug 26, 2024
1 parent f32ea7e commit 611f5ec
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion capabilities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func ExampleClient_GetCapabilities() {
// Get the capabilities
capabilities, err := client.GetCapabilities(testDomain, DefaultPort)
if err != nil {
fmt.Printf("error getting capabilities: " + err.Error())
fmt.Printf("error getting capabilities: %v\n", err)
return
}
fmt.Printf("found %d capabilities", len(capabilities.Capabilities))
Expand Down
2 changes: 1 addition & 1 deletion p2p_payment_destination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func ExampleClient_GetP2PPaymentDestination() {
return
}
if len(destination.Outputs) > 0 {
fmt.Printf("payment destination: " + destination.Outputs[0].Script)
fmt.Printf("payment destination: %s\n", destination.Outputs[0].Script)
}
// Output:payment destination: 76a9143e2d1d795f8acaa7957045cc59376177eb04a3c588ac
}
Expand Down
2 changes: 1 addition & 1 deletion pki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func ExampleClient_GetPKI() {
// Get the pki
pki, err := client.GetPKI(testServerURL+"id/{alias}@{domain.tld}", testAlias, testDomain)
if err != nil {
fmt.Printf("error getting pki: " + err.Error())
fmt.Printf("error getting pki: %v\n", err)
return
}
fmt.Printf("found %s handle with pubkey: %s", pki.Handle, pki.PubKey)
Expand Down
2 changes: 1 addition & 1 deletion public_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func ExampleClient_GetPublicProfile() {
// Get profile
profile, err := client.GetPublicProfile(testServerURL+"public-profile/{alias}@{domain.tld}", testAlias, testDomain)
if err != nil {
fmt.Printf("error getting profile: " + err.Error())
fmt.Printf("error getting profile: %v\n", err)
return
}
fmt.Printf("found profile for: %s", profile.Name)
Expand Down
7 changes: 4 additions & 3 deletions server/config.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package server

import (
"github.com/bitcoin-sv/go-paymail/errors"
"github.com/rs/zerolog"
"slices"
"strings"
"time"

"github.com/bitcoin-sv/go-paymail/errors"
"github.com/rs/zerolog"

"github.com/bitcoin-sv/go-paymail"
)

Expand Down Expand Up @@ -68,7 +69,7 @@ func (c *Configuration) Validate() error {
return errors.ErrBsvAliasMissing
}

if c.callableCapabilities == nil || len(c.callableCapabilities) == 0 {
if len(c.callableCapabilities) == 0 {
return errors.ErrCapabilitiesMissing
}

Expand Down
2 changes: 1 addition & 1 deletion verify_pubkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func ExampleClient_VerifyPubKey() {
testAlias, testDomain, testPubKey,
)
if err != nil {
fmt.Printf("error getting verification: " + err.Error())
fmt.Printf("error getting verification: %v\n", err)
return
}
fmt.Printf("verified %s handle with pubkey: %s", verification.Handle, verification.PubKey)
Expand Down

0 comments on commit 611f5ec

Please sign in to comment.