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

Commit

Permalink
Merge pull request #2027 from OpenBazaar/brian.fix-traavis
Browse files Browse the repository at this point in the history
Upgrade golangci
  • Loading branch information
hoffmabc authored Mar 9, 2020
2 parents 569a972 + 707a3f1 commit c1e7b23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion api/jsonapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions ipfs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion repo/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c1e7b23

Please sign in to comment.