Skip to content

Commit

Permalink
[chore] library upgrade and go upgrade (#396)
Browse files Browse the repository at this point in the history
* library upgrade since circleci hanging

* push some changes

* update go version

* 1.17 compat

* go mod tidy update

* revert key change
  • Loading branch information
shrimalmadhur authored Apr 13, 2022
1 parent 30818f6 commit 6f89200
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ version: 2.1
executors:
default:
docker:
- image: cimg/go:1.16
- image: cimg/go:1.17
user: root # go directory is owned by root
working_directory: /go/src/github.com/coinbase/rosetta-sdk-go
environment:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
ADDLICENSE_INSTALL=go install github.com/google/addlicense@latest
ADDLICENSE_CMD=addlicense
ADDLICENCE_SCRIPT=${ADDLICENSE_CMD} -c "Coinbase, Inc." -l "apache" -v
GOIMPORTS_CMD=go run golang.org/x/tools/cmd/goimports
GOIMPORTS_INSTALL=go install golang.org/x/tools/cmd/goimports@latest
GOIMPORTS_CMD=goimports
GOLINES_INSTALL=go install github.com/segmentio/golines@latest
GOLINES_CMD=golines
GOVERALLS_INSTALL=go install github.com/mattn/goveralls@latest
Expand All @@ -22,7 +23,7 @@ TEST_SCRIPT=go test ${GO_PACKAGES}
LINT_SETTINGS=golint,misspell,gocyclo,gocritic,whitespace,goconst,gocognit,bodyclose,unconvert,lll,unparam

deps:
go get ./...
go install ./...

gen:
./codegen.sh;
Expand All @@ -45,10 +46,12 @@ lint: | lint-examples

format:
gofmt -s -w -l .
${GOIMPORTS_INSTALL}
${GOIMPORTS_CMD} -w .

check-format:
! gofmt -s -l . | read;
${GOIMPORTS_INSTALL}
! ${GOIMPORTS_CMD} -l . | read;

test:
Expand Down
4 changes: 2 additions & 2 deletions codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ done

# Format client generated code
FORMAT_GEN="gofmt -w /local/types; gofmt -w /local/client; gofmt -w /local/server"
GOLANG_VERSION=1.16
GOLANG_VERSION=1.17
docker run --rm -v "${PWD}":/local \
golang:${GOLANG_VERSION} sh -c \
"cd /local; make deps; ${FORMAT_GEN}; make add-license; make shorten-lines; make fix-imports; go mod tidy;"
"cd /local; make deps; ${FORMAT_GEN}; make add-license; make shorten-lines; make fix-imports; go mod tidy -compat=1.17;"
35 changes: 29 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/coinbase/rosetta-sdk-go

go 1.16
go 1.17

require (
github.com/DataDog/zstd v1.5.0
Expand All @@ -9,21 +9,44 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coinbase/kryptology v1.8.0
github.com/dgraph-io/badger/v2 v2.2007.4
github.com/dgraph-io/ristretto v0.0.3 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/ethereum/go-ethereum v1.10.16
github.com/ethereum/go-ethereum v1.10.17
github.com/fatih/color v1.13.0
github.com/gorilla/mux v1.8.0
github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77
github.com/mitchellh/mapstructure v1.4.3
github.com/neilotoole/errgroup v0.1.6
github.com/segmentio/fasthash v1.0.3
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.7.1
github.com/tidwall/gjson v1.14.0
github.com/tidwall/sjson v1.2.4
github.com/vmihailenco/msgpack/v5 v5.3.5
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
)

require (
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
github.com/bwesterb/go-ristretto v1.2.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/consensys/gnark-crypto v0.5.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.0.3 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.12.3 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit 6f89200

Please sign in to comment.