diff --git a/.travis.yml b/.travis.yml index 16364ac09..93dcd9ba9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: go go: - - 1.8.x - 1.9.x - 1.10.x - 1.11.x @@ -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 diff --git a/Gopkg.lock b/Gopkg.lock index 190ab41cf..45a10e479 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,72 +2,108 @@ [[projects]] + digest = "1:e4b30804a381d7603b8a344009987c1ba351c26043501b23b8c7ce21f0b67474" name = "github.com/BurntSushi/toml" packages = ["."] - revision = "2dff11163ee667d51dcc066660925a92ce138deb" + pruneopts = "" + revision = "v0.3.1" [[projects]] + digest = "1:90899f76443f9a7f6de1547f1e713951c383cca970eeff5bc7bff3607fc1a48c" name = "github.com/bitly/go-hostpool" packages = ["."] - revision = "a3a6125de9329587178a9792dc8f4bc98e620d2d" + pruneopts = "" + revision = "a3a6125de932" [[projects]] + digest = "1:9e409df6d0c9b8707e5bcaa6e2a0d99c145f14db7759455ac99170a019757ae7" name = "github.com/bitly/timer_metrics" packages = ["."] - revision = "afad1794bb13e2a094720aeb27c088aa64564895" + pruneopts = "" + revision = "b1c65ca7ae62" [[projects]] + digest = "1:79421244ba5848aae4b0a5c41e633a04e4894cb0b164a219dc8c15ec7facb7f1" name = "github.com/blang/semver" packages = ["."] - revision = "9bf7bff48b0388cb75991e58c6df7d13e982f1f2" + pruneopts = "" + revision = "v3.5.1" [[projects]] + digest = "1:0f41c61095048870d68c6e932130b028323e7d65e69f1be57536181fed983c6f" name = "github.com/bmizerany/perks" packages = ["quantile"] - revision = "6cb9d9d729303ee2628580d9aec5db968da3a607" + pruneopts = "" + revision = "d9a9656a3a4b" [[projects]] + digest = "1:2a5888946cdbc8aa360fd43301f9fc7869d663f60d5eedae7d4e6e5e4f06f2bf" name = "github.com/golang/snappy" packages = ["."] - revision = "d9eb7a3d35ec988b8585d4a0068e462c27d28380" + pruneopts = "" + revision = "2e65f85255db" [[projects]] + digest = "1:588fccacebfd731e835e3f8f5adb848535f9aa57def5465f19a69a07354598d6" name = "github.com/judwhite/go-svc" packages = ["svc"] - revision = "63c12402f579f0bdf022653c821a1aa5d7544f01" + pruneopts = "" + revision = "v1.0.0" [[projects]] + digest = "1:deeb6536ebbcb66ab11213ecfaac9daadfcd004dd057446a4980ffd6c15c36e2" name = "github.com/julienschmidt/httprouter" packages = ["."] - revision = "6aacfd5ab513e34f7e64ea9627ab9670371b34e7" + pruneopts = "" + revision = "v1.2.0" [[projects]] + digest = "1:9408fb9c637c103010e5147469c232ce6b68edc840879cc730a2a15918e6cae8" name = "github.com/mreiferson/go-options" packages = ["."] - revision = "77551d20752b54535462404ad9d877ebdb26e53d" + pruneopts = "" + revision = "77551d20752b" [[projects]] + digest = "1:22ffd73c4580854d935821a0fa95ff7324df836efa86d256adeb392450cbde87" name = "github.com/nsqio/go-diskqueue" packages = ["."] - revision = "0681a1afee1245efa503b7543989fc26d8f268bc" + pruneopts = "" + revision = "74cfbc9de839" [[projects]] + digest = "1:7a69f6a3a33929f8b66aa39c93868ad1698f06417fe627ae067559beb94504bd" name = "github.com/nsqio/go-nsq" packages = ["."] - revision = "a53d495e81424aaf7a7665a9d32a97715c40e953" + pruneopts = "" + revision = "v1.0.7" [[projects]] branch = "master" + digest = "1:e6d1805ead5b8f2439808f76187f54042ed35ee26eb9ca63127259a0e612b119" name = "golang.org/x/sys" packages = [ "windows", - "windows/svc" + "windows/svc", ] - revision = "661970f62f5897bc0cd5fdca7e087ba8a98a8fa1" + pruneopts = "" + revision = "b4a75ba826a64a70990f11a225237acd6ef35c9f" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "d47ae3c107eee6969aec751badb5b6e788202f5351f8a9dd83ef9059804d5882" + input-imports = [ + "github.com/BurntSushi/toml", + "github.com/bitly/go-hostpool", + "github.com/bitly/timer_metrics", + "github.com/blang/semver", + "github.com/bmizerany/perks/quantile", + "github.com/golang/snappy", + "github.com/judwhite/go-svc/svc", + "github.com/julienschmidt/httprouter", + "github.com/mreiferson/go-options", + "github.com/nsqio/go-diskqueue", + "github.com/nsqio/go-nsq", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 67314f3cc..df9b1551f 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -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" diff --git a/dist.sh b/dist.sh index fbe830b2b..1660de575 100755 --- a/dist.sh +++ b/dist.sh @@ -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) @@ -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 diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..c2da58714 --- /dev/null +++ b/go.mod @@ -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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..cbbefd457 --- /dev/null +++ b/go.sum @@ -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= diff --git a/travis.sh b/travis.sh new file mode 100755 index 000000000..ebad62af3 --- /dev/null +++ b/travis.sh @@ -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