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

Commit c1e7b23

Browse files
authored
Merge pull request #2027 from OpenBazaar/brian.fix-traavis
Upgrade golangci
2 parents 569a972 + 707a3f1 commit c1e7b23

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ env:
88
- "PATH=/home/travis/gopath/bin:$PATH"
99
before_install:
1010
- go get -u github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/tcnksm/ghr
11-
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0
11+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.23.3
1212
install:
1313
- echo "No external dependencies required. Skipping travis default library dependency setup to use vendors..."
1414
script:
15-
- $GOPATH/bin/golangci-lint run --deadline 10m --new-from-rev=24dc0f64
15+
- $GOPATH/bin/golangci-lint run --deadline 10m --new-from-rev=
1616
- cd $TRAVIS_BUILD_DIR && go test -i && ./test_compile.sh
1717
- goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN
1818
after_success:

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)