Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 707a3f1

Browse files
committed
golangci lint fixes
1 parent 98a9ed1 commit 707a3f1

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

api/jsonapi.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3696,7 +3696,10 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request
36963696
id := r.URL.Query().Get("asyncID")
36973697
if id == "" {
36983698
idBytes := make([]byte, 16)
3699-
rand.Read(idBytes)
3699+
_, err := rand.Read(idBytes)
3700+
if err != nil {
3701+
return
3702+
}
37003703
id = base58.Encode(idBytes)
37013704
}
37023705

ipfs/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/ipfs/go-ipfs/repo"
1616
)
1717

18-
var routerCacheURI string
18+
//var routerCacheURI string
1919

2020
// UpdateIPFSGlobalProtocolVars is a hack to manage custom protocol strings
2121
// which do not yet have an API to manage their configuration
@@ -34,7 +34,7 @@ func UpdateIPFSGlobalProtocolVars(testnetEnable bool) {
3434
// PrepareIPFSConfig builds the configuration options for the internal
3535
// IPFS node.
3636
func PrepareIPFSConfig(r repo.Repo, routerAPIEndpoint string, testEnable, regtestEnable bool) *ipfscore.BuildCfg {
37-
routerCacheURI = routerAPIEndpoint
37+
//routerCacheURI = routerAPIEndpoint
3838
ncfg := &ipfscore.BuildCfg{
3939
Repo: r,
4040
Online: true,

repo/notification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ func (n PaymentNotification) GetID() string { return n.ID }
450450
func (n PaymentNotification) GetType() NotificationType { return NotifierTypePaymentNotification }
451451
func (n PaymentNotification) GetSMTPTitleAndBody() (string, string, bool) {
452452
form := "Payment for order \"%s\" received (total %d)."
453-
return "Payment received", fmt.Sprintf(form, n.OrderId, n.FundingTotal), true
453+
return "Payment received", fmt.Sprintf(form, n.OrderId, n.FundingTotal.Amount), true
454454
}
455455

456456
type OrderConfirmationNotification struct {

0 commit comments

Comments
 (0)