Skip to content

Commit

Permalink
Merge pull request #248 from mreiferson/gomod
Browse files Browse the repository at this point in the history
go.mod: switch to go modules
  • Loading branch information
mreiferson authored Mar 6, 2019
2 parents 0527e80 + 32ad317 commit 4f1e133
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
language: go
go:
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
env:
- NSQ_DOWNLOAD=nsq-0.3.8.linux-amd64.go1.6.2 GOARCH=amd64
- NSQ_DOWNLOAD=nsq-0.3.8.linux-amd64.go1.6.2 GOARCH=386
- NSQ_DOWNLOAD=nsq-1.0.0-compat.linux-amd64.go1.8 GOARCH=amd64
- NSQ_DOWNLOAD=nsq-1.0.0-compat.linux-amd64.go1.8 GOARCH=386
- NSQ_DOWNLOAD=nsq-1.1.0.linux-amd64.go1.10.3 GOARCH=amd64
- NSQ_DOWNLOAD=nsq-1.1.0.linux-amd64.go1.10.3 GOARCH=386
install:
- wget -O dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
- chmod +x dep
- ./dep ensure
script:
- wget http://bitly-downloads.s3.amazonaws.com/nsq/$NSQ_DOWNLOAD.tar.gz
- tar zxvf $NSQ_DOWNLOAD.tar.gz
- export PATH=$NSQ_DOWNLOAD/bin:$PATH
- pushd $TRAVIS_BUILD_DIR
- ./test.sh
- popd
- ./travis.sh
notifications:
email: false
sudo: false
6 changes: 4 additions & 2 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

[[constraint]]
name = "github.com/golang/snappy"
revision = "d9eb7a3d35ec988b8585d4a0068e462c27d28380"
revision = "v0.0.1"
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/nsqio/go-nsq

go 1.11

require github.com/golang/snappy v0.0.1
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec h1:ZaSUjYC8aWT/om43c8YVz0SqjT8ABtqw7REbZGsCroE=
github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
18 changes: 18 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

wget http://bitly-downloads.s3.amazonaws.com/nsq/$NSQ_DOWNLOAD.tar.gz
tar zxvf $NSQ_DOWNLOAD.tar.gz
export PATH=$NSQ_DOWNLOAD/bin:$PATH

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

0 comments on commit 4f1e133

Please sign in to comment.