Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: update to use Go modules #1115

Merged
merged 14 commits into from
Jan 2, 2019
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: go
go:
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
Expand All @@ -12,10 +11,6 @@ go_import_path: github.com/nsqio/nsq
before_install:
- go get github.com/mattn/goveralls
script:
- wget -O dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
- chmod +x dep
- ./dep ensure
- ./test.sh
- ./coverage.sh --coveralls
- ./travis.sh
notifications:
email: false
64 changes: 50 additions & 14 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,44 @@

[[constraint]]
name = "github.com/BurntSushi/toml"
revision = "2dff11163ee667d51dcc066660925a92ce138deb"
revision = "v0.3.1"

[[constraint]]
name = "github.com/bitly/go-hostpool"
revision = "a3a6125de9329587178a9792dc8f4bc98e620d2d"
revision = "a3a6125de932"

[[constraint]]
name = "github.com/bitly/timer_metrics"
revision = "afad1794bb13e2a094720aeb27c088aa64564895"
revision = "b1c65ca7ae62"

[[constraint]]
name = "github.com/blang/semver"
revision = "9bf7bff48b0388cb75991e58c6df7d13e982f1f2"
revision = "v3.5.1"

[[constraint]]
name = "github.com/bmizerany/perks"
revision = "6cb9d9d729303ee2628580d9aec5db968da3a607"
revision = "d9a9656a3a4b"

[[constraint]]
name = "github.com/golang/snappy"
revision = "d9eb7a3d35ec988b8585d4a0068e462c27d28380"
revision = "2e65f85255db"

[[constraint]]
name = "github.com/judwhite/go-svc"
revision = "63c12402f579f0bdf022653c821a1aa5d7544f01"
revision = "v1.0.0"

[[constraint]]
name = "github.com/julienschmidt/httprouter"
revision = "6aacfd5ab513e34f7e64ea9627ab9670371b34e7"
revision = "v1.2.0"

[[constraint]]
name = "github.com/mreiferson/go-options"
revision = "77551d20752b54535462404ad9d877ebdb26e53d"
revision = "77551d20752b"

[[constraint]]
name = "github.com/nsqio/go-diskqueue"
revision = "0681a1afee1245efa503b7543989fc26d8f268bc"
revision = "74cfbc9de839"

[[constraint]]
name = "github.com/nsqio/go-nsq"
revision = "a53d495e81424aaf7a7665a9d32a97715c40e953"
revision = "v1.0.7"
3 changes: 1 addition & 2 deletions dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
rm -rf $DIR/dist/docker
mkdir -p $DIR/dist/docker
dep ensure

GOFLAGS='-ldflags="-s -w"'
arch=$(go env GOARCH)
Expand All @@ -31,7 +30,7 @@ for os in linux darwin freebsd windows; do
echo "... building v$version for $os/$arch"
BUILD=$(mktemp -d ${TMPDIR:-/tmp}/nsq-XXXXX)
TARGET="nsq-$version.$os-$arch.$goversion"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 \
GO111MODULE=on GOOS=$os GOARCH=$arch CGO_ENABLED=0 \
make DESTDIR=$BUILD PREFIX=/$TARGET BLDFLAGS="$GOFLAGS" install
pushd $BUILD
sudo chown -R 0:0 $TARGET
Expand Down
19 changes: 19 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module github.com/nsqio/nsq

require (
github.com/BurntSushi/toml v0.3.1
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932
github.com/bitly/timer_metrics v0.0.0-20170606164300-b1c65ca7ae62
github.com/blang/semver v3.5.1+incompatible
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/judwhite/go-svc v1.0.0
github.com/julienschmidt/httprouter v1.2.0
github.com/mreiferson/go-options v0.0.0-20161229190002-77551d20752b
github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839
github.com/nsqio/go-nsq v1.0.7
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2 // indirect
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6 // indirect
)
30 changes: 30 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bitly/timer_metrics v0.0.0-20170606164300-b1c65ca7ae62 h1:XweEvNzrfQJdCmTP7Uo8LQP6P5cwQWwqvXobrZQcW0M=
github.com/bitly/timer_metrics v0.0.0-20170606164300-b1c65ca7ae62/go.mod h1:EJqiy/5FjJk5tEOxXhnxvFijOmeB5ka1D2fvqHOXUXA=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b h1:AP/Y7sqYicnjGDfD5VcY4CIfh1hRXBUavxrvELjTiOE=
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/judwhite/go-svc v1.0.0 h1:W447kYhZsqC14hkfNG8XLy9wbYibeMW75g5DtAIpFGw=
github.com/judwhite/go-svc v1.0.0/go.mod h1:EeMSAFO3mLgEQfcvnZ50JDG0O1uQlagpAbMS6talrXE=
github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/mreiferson/go-options v0.0.0-20161229190002-77551d20752b h1:xjKomx939vefURtocD1uaKvcvAp1dNYX05i0TIpnfVI=
github.com/mreiferson/go-options v0.0.0-20161229190002-77551d20752b/go.mod h1:A0JOgZNsj9V+npbgxH0Ib75PvrHS6Ezri/4HdcTp/DI=
github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839 h1:nZ0z0haJRzCXAWH9Jl+BUnfD2n2MCSbGRSl8VBX+zR0=
github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839/go.mod h1:AYinRDfdKMmVKTPI8wOcLgjcw2pTS3jo8fib1VxOzsE=
github.com/nsqio/go-nsq v1.0.7 h1:O0pIZJYTf+x7cZBA0UMY8WxFG79lYTURmWzAAh48ljY=
github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito=
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/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6 h1:IcgEB62HYgAhX0Nd/QrVgZlxlcyxbGQHElLUhW2X4Fo=
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
15 changes: 15 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -e

go_minor_version=$(go version | awk '{print $3}' | awk -F. '{print $2}')
if [[ $go_minor_version -gt 10 ]]; then
export GO111MODULE=on
else
wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
chmod +x dep
./dep ensure
fi

./test.sh
./coverage.sh --coveralls