From 46331b829153450b8386dd7293349303dbcb39cb Mon Sep 17 00:00:00 2001 From: Akhil Thayyil Date: Mon, 27 Apr 2020 11:31:59 +0200 Subject: [PATCH 1/2] migrating to go mod --- Makefile | 7 +++---- build/test.sh | 2 +- go.mod | 18 +++++++++++++++++ go.sum | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/Makefile b/Makefile index 7db6ace..8058612 100644 --- a/Makefile +++ b/Makefile @@ -16,16 +16,15 @@ all: deps test lint deps: @echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)" - @go get -u github.com/golang/dep/cmd/dep - @go get -u github.com/golang/lint/golint - @dep ensure -v -vendor-only + @go get -u golang.org/x/lint/golint + @go mod vendor -v test: @/bin/sh -c "./build/test.sh $(allpackages)" lint: @echo "$(OK_COLOR)==> Linting... $(NO_COLOR)" - @golint $(allpackages) + @$(GOPATH)/bin/golint $(allpackages) # cd into the GOPATH to workaround ./... not following symlinks _allpackages = $(shell ( go list ./... 2>&1 1>&3 | \ diff --git a/build/test.sh b/build/test.sh index de03442..973a2d3 100755 --- a/build/test.sh +++ b/build/test.sh @@ -50,7 +50,7 @@ fi echo ${PASS} echo "${OK_COLOR}Lintting: ${NO_COLOR}" -ERRS=$(golint ${TARGETS} 2>&1 || true) +ERRS=$(${GOPATH}/bin/golint ${TARGETS} 2>&1 || true) if [ -n "${ERRS}" ]; then echo ${FAIL} echo "${ERRS}" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e4c166f --- /dev/null +++ b/go.mod @@ -0,0 +1,18 @@ +module github.com/hellofresh/updater-go + +go 1.14 + +require ( + github.com/Masterminds/semver v1.4.2 + github.com/golang/protobuf v1.1.0 // indirect + github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 + github.com/shurcooL/githubv4 v0.0.0-20180509030948-19298c78142b + github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e // indirect + github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75 // indirect + github.com/stretchr/testify v1.5.1 // indirect + golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect + golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect + golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b // indirect + google.golang.org/appengine v1.1.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..928df1a --- /dev/null +++ b/go.sum @@ -0,0 +1,55 @@ +github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 h1:nRlQD0u1871kaznCnn1EvYiMbum36v7hw1DLPEjds4o= +github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177/go.mod h1:ao5zGxj8Z4x60IOVYZUbDSmt3R8Ddo080vEgPosHpak= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/shurcooL/githubv4 v0.0.0-20180509030948-19298c78142b h1:rvtz1nqABF64h0VCWseq6aiR4i1eAnbU9Zd3am6JpC0= +github.com/shurcooL/githubv4 v0.0.0-20180509030948-19298c78142b/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75 h1:tm3k/UttRKDcrwI1BWe3Vvhjsb2FKmT+z5UDtyNVZ88= +github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E= +golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc h1:3ElrZeO6IBP+M8kgu5YFwRo92Gqr+zBg3aooYQ6ziqU= +golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuHtwM6KV/vb4U85g/cigFY= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b h1:zSzQJAznWxAh9fZxiPy2FZo+ZZEYoYFYYDYdOrU7AaM= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From a061258a2e1d54b5fa5507f9f2df81eafead7fad Mon Sep 17 00:00:00 2001 From: Akhil Thayyil Date: Mon, 27 Apr 2020 11:32:14 +0200 Subject: [PATCH 2/2] removing dep files --- Gopkg.lock | 107 ----------------------------------------------------- Gopkg.toml | 46 ----------------------- 2 files changed, 153 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 7890fc4..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,107 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:55388fd080150b9a072912f97b1f5891eb0b50df43401f8b75fb4273d3fec9fc" - name = "github.com/Masterminds/semver" - packages = ["."] - pruneopts = "UT" - revision = "c7af12943936e8c39859482e61f0574c2fd7fc75" - version = "v1.4.2" - -[[projects]] - digest = "1:15042ad3498153684d09f393bbaec6b216c8eec6d61f63dff711de7d64ed8861" - name = "github.com/golang/protobuf" - packages = ["proto"] - pruneopts = "UT" - revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:c497b54ed4be2a7753ae4bfc7629f7168530f22e70ede8badd2aae657ba472b4" - name = "github.com/palantir/stacktrace" - packages = [ - ".", - "cleanpath", - ] - pruneopts = "UT" - revision = "78658fd2d1772b755720ed8c44367d11ee5380d6" - -[[projects]] - branch = "master" - digest = "1:a1562fb3021983f533a27d02ebf36f1bc1ab327660d611d6e948970b54087792" - name = "github.com/shurcooL/githubv4" - packages = ["."] - pruneopts = "UT" - revision = "19298c78142b5fe80c2cdaa2091bc51cbc3a94fc" - -[[projects]] - branch = "master" - digest = "1:ddaa79b37808fbd09a1c3f484bba6320c884664dfc25ccc5f2d7d5a82222177c" - name = "github.com/shurcooL/go" - packages = ["ctxhttp"] - pruneopts = "UT" - revision = "9e1955d9fb6e1ee2345ba1f5e71669263e719e27" - -[[projects]] - branch = "master" - digest = "1:a8f210a8beb6984176d56d38660ac0116f79d8c337db1caa136d4bbc13348c92" - name = "github.com/shurcooL/graphql" - packages = [ - ".", - "ident", - "internal/jsonutil", - ] - pruneopts = "UT" - revision = "62c9ce094e75302d560f7adcdf16c06d05aaa958" - -[[projects]] - branch = "master" - digest = "1:d6b719875cf8091fbab38527d81d34e71f4521b9ee9ccfbd4a32cff2ac5af96e" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - ] - pruneopts = "UT" - revision = "c39426892332e1bb5ec0a434a079bf82f5d30c54" - -[[projects]] - branch = "master" - digest = "1:af19f6e6c369bf51ef226e989034cd88a45083173c02ac4d7ab74c9a90d356b7" - name = "golang.org/x/oauth2" - packages = [ - ".", - "internal", - ] - pruneopts = "UT" - revision = "3d292e4d0cdc3a0113e6d207bb137145ef1de42f" - -[[projects]] - digest = "1:328b5e4f197d928c444a51a75385f4b978915c0e75521f0ad6a3db976c97a7d3" - name = "google.golang.org/appengine" - packages = [ - "internal", - "internal/base", - "internal/datastore", - "internal/log", - "internal/remote_api", - "internal/urlfetch", - "urlfetch", - ] - pruneopts = "UT" - revision = "b1f26356af11148e710935ed1ac8a7f5702c7612" - version = "v1.1.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/Masterminds/semver", - "github.com/palantir/stacktrace", - "github.com/shurcooL/githubv4", - "golang.org/x/oauth2", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index d49d07e..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,46 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/Masterminds/semver" - version = "1.4.2" - -[[constraint]] - branch = "master" - name = "github.com/palantir/stacktrace" - -[[constraint]] - branch = "master" - name = "github.com/shurcooL/githubv4" - -[[constraint]] - branch = "master" - name = "golang.org/x/oauth2" - -[prune] - go-tests = true - unused-packages = true