Skip to content

Commit

Permalink
Merge pull request #86 from mackerelio/go-mod
Browse files Browse the repository at this point in the history
support Go Modules
  • Loading branch information
lufia authored Apr 11, 2019
2 parents cf22153 + 0638843 commit c64facc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ after_script:
notifications:
slack:
secure: cPeJRg+ouTlemEV5UM4muhDwtIM0dktcs3mnfB73oZ2MGOimv/DFpL+VTRLlkWau8l0dT4ngLlGPcveLrXQXwps2LsJMr+gS6Az/CAQCIl21oj4bnjs5uGYTG8hM8ymVzGINPNnj5Fnn5DUMunA2sow30qxfuCnSUMGot2nFRKw=
env:
- GO111MODULE=on
- GO111MODULE=off
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
.PHONY: test
test: lint gofmt
go test -v ./...

.PHONY: testdeps
testdeps:
go get -d -v -t ./...
GO111MODULE=off \
go get golang.org/x/lint/golint \
golang.org/x/tools/cmd/cover \
github.com/axw/gocov/gocov \
github.com/mattn/goveralls

LINT_RET = .golint.txt
.PHONY: lint
lint: testdeps
go vet .
rm -f $(LINT_RET)
golint ./... | tee $(LINT_RET)
test ! -s $(LINT_RET)

GOFMT_RET = .gofmt.txt
.PHONY: gofmt
gofmt: testdeps
rm -f $(GOFMT_RET)
gofmt -s -d *.go | tee $(GOFMT_RET)
test ! -s $(GOFMT_RET)

.PHONY: cover
cover: testdeps
goveralls

.PHONY: test testdeps lint gofmt cover
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/mackerelio/mackerel-client-go

go 1.12

require github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=

0 comments on commit c64facc

Please sign in to comment.