diff --git a/.travis.yml b/.travis.yml index 724a5e258d..dc57e48c61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,11 @@ env: - "PATH=/home/travis/gopath/bin:$PATH" before_install: - go get -u github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/tcnksm/ghr - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0 + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.23.3 install: - echo "No external dependencies required. Skipping travis default library dependency setup to use vendors..." script: - - $GOPATH/bin/golangci-lint run --deadline 10m --new-from-rev=24dc0f64 + - $GOPATH/bin/golangci-lint run --deadline 10m --new-from-rev= - cd $TRAVIS_BUILD_DIR && go test -i && ./test_compile.sh - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN after_success: diff --git a/api/jsonapi.go b/api/jsonapi.go index 4e7be901b6..167d0291c3 100644 --- a/api/jsonapi.go +++ b/api/jsonapi.go @@ -3696,7 +3696,10 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request id := r.URL.Query().Get("asyncID") if id == "" { idBytes := make([]byte, 16) - rand.Read(idBytes) + _, err := rand.Read(idBytes) + if err != nil { + return + } id = base58.Encode(idBytes) } diff --git a/ipfs/config.go b/ipfs/config.go index b041bd8008..f3ec28c7b9 100644 --- a/ipfs/config.go +++ b/ipfs/config.go @@ -15,7 +15,7 @@ import ( "github.com/ipfs/go-ipfs/repo" ) -var routerCacheURI string +//var routerCacheURI string // UpdateIPFSGlobalProtocolVars is a hack to manage custom protocol strings // which do not yet have an API to manage their configuration @@ -34,7 +34,7 @@ func UpdateIPFSGlobalProtocolVars(testnetEnable bool) { // PrepareIPFSConfig builds the configuration options for the internal // IPFS node. func PrepareIPFSConfig(r repo.Repo, routerAPIEndpoint string, testEnable, regtestEnable bool) *ipfscore.BuildCfg { - routerCacheURI = routerAPIEndpoint + //routerCacheURI = routerAPIEndpoint ncfg := &ipfscore.BuildCfg{ Repo: r, Online: true, diff --git a/repo/notification.go b/repo/notification.go index 17d455fb59..db00615c6f 100644 --- a/repo/notification.go +++ b/repo/notification.go @@ -450,7 +450,7 @@ func (n PaymentNotification) GetID() string { return n.ID } func (n PaymentNotification) GetType() NotificationType { return NotifierTypePaymentNotification } func (n PaymentNotification) GetSMTPTitleAndBody() (string, string, bool) { form := "Payment for order \"%s\" received (total %d)." - return "Payment received", fmt.Sprintf(form, n.OrderId, n.FundingTotal), true + return "Payment received", fmt.Sprintf(form, n.OrderId, n.FundingTotal.Amount), true } type OrderConfirmationNotification struct {