Skip to content

Commit d53e0a7

Browse files
committed
switch to go 1.11 modules
1 parent 6457a0b commit d53e0a7

File tree

142 files changed

+18
-39903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+18
-39903
lines changed

.appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ install:
5151
build_script:
5252
- cd c:\go\src\github.com\fstab\grok_exporter
5353
- git submodule update --init --recursive
54+
- setx GO111MODULE on
5455
- go version
5556
- go test github.com/fstab/grok_exporter
5657
- go test github.com/fstab/grok_exporter/config
@@ -59,6 +60,8 @@ build_script:
5960
- go test github.com/fstab/grok_exporter/exporter
6061
- go test github.com/fstab/grok_exporter/oniguruma
6162
- go test github.com/fstab/grok_exporter/tailer
63+
- go test github.com/fstab/grok_exporter/tailer/fswatcher
64+
- go test github.com/fstab/grok_exporter/tailer/glob
6265
- go test github.com/fstab/grok_exporter/template
6366
- go install github.com/fstab/grok_exporter
6467
- C:\cygwin\bin\bash -c "cd /cygdrive/c/go/src/github.com/fstab/grok_exporter ; PATH='/usr/sbin:/usr/bin:/sbin:/bin' ./integration-test.sh"

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22

33
go:
4-
- "1.10"
4+
- "1.11"
55

66
os:
77
- linux
@@ -60,14 +60,15 @@ script:
6060
else
6161
LDD_COMMAND="ldd" ;
6262
fi
63+
export GO111MODULE=on ;
6364
case "$MODE" in
6465
"STATIC")
6566
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ;
6667
then
6768
sed -i.bak 's;#cgo LDFLAGS: -L/usr/local/lib -lonig;#cgo LDFLAGS: /usr/local/lib/libonig.a;' oniguruma/oniguruma.go ;
6869
fi ;
69-
CGO_LDFLAGS=/usr/local/lib/libonig.a go test -v $(go list ./... | grep -v /vendor/) ;
70-
CGO_LDFLAGS=/usr/local/lib/libonig.a go install . ;
70+
CGO_LDFLAGS=/usr/local/lib/libonig.a go test -count=1 -v ./... ;
71+
CGO_LDFLAGS=/usr/local/lib/libonig.a go install ;
7172
if $LDD_COMMAND $GOPATH/bin/grok_exporter | grep libonig ;
7273
then
7374
echo "ERROR: Expected statically linked binary." >&2 ;
@@ -76,8 +77,8 @@ script:
7677
./integration-test.sh ;
7778
;;
7879
*)
79-
go test -v $(go list ./... | grep -v /vendor/) ;
80-
go install . ;
80+
go test -count=1 -v ./... ;
81+
go install ;
8182
if ! $LDD_COMMAND $GOPATH/bin/grok_exporter | grep libonig ;
8283
then
8384
echo "ERROR: Expected dynamically linked binary." >&2 ;
@@ -91,10 +92,11 @@ after_success:
9192
- |
9293
set -e ;
9394
set -x ;
95+
export GO111MODULE=on ;
9496
if [[ "$TRAVIS_OS_NAME" == "linux" && "$ONIG_VERSION" == "DEFAULT" ]] ;
9597
then
9698
go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls github.com/modocache/gover ;
97-
go list ./... | grep -v /vendor/ | while read package ;
99+
go list ./... | while read package ;
98100
do
99101
go test -covermode count -coverprofile=$(basename $package).coverprofile $package ;
100102
done ;

go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/fstab/grok_exporter
2+
3+
require (
4+
github.com/prometheus/client_golang v0.9.2
5+
github.com/sirupsen/logrus v1.2.0
6+
gopkg.in/yaml.v2 v2.2.2
7+
)

vendor/github.com/beorn7/perks/LICENSE

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)