Use Go modules

This commit is contained in:
Martin Polden 2018-08-27 20:45:51 +02:00
parent 988f3fd19a
commit fefe371369
6 changed files with 22 additions and 47 deletions

3
.gitignore vendored
View File

@ -1,4 +1,3 @@
/data/
/custom.html
/vendor/*
!/vendor/vendor.json
/vendor/

View File

@ -5,6 +5,11 @@ language: go
go:
- stable
# Go module behaviour is disabled by default for packages inside GOPATH.
# Turn module support on explicitly:
env:
- GO111MODULE=on
deploy:
provider: heroku
app: ifconfig-co

View File

@ -23,12 +23,12 @@ ifdef TRAVIS
endif
check-fmt:
bash -c 'diff --line-format="%L" <(echo -n) <(gofmt -d -s $$(find . -type f -name "*.go" -not -path "./vendor/*"))'
bash -c "diff --line-format='%L' <(echo -n) <(gofmt -d -s .)"
lint: check-fmt vet megacheck
deps:
go get -d -v ./...
go get
install:
go install ./...

10
go.mod Normal file
View File

@ -0,0 +1,10 @@
// +heroku install ./...
// +heroku goVersion go1.11
module github.com/mpolden/echoip
require (
github.com/jessevdk/go-flags v1.4.0
github.com/oschwald/geoip2-golang v1.1.0
github.com/oschwald/maxminddb-golang v1.2.1
golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5
)

4
go.sum Normal file
View File

@ -0,0 +1,4 @@
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/oschwald/geoip2-golang v1.1.0/go.mod h1:0LTTzix/Ao1uMvOhAV4iLU0Lz7eCrP94qZWBTDKf0iE=
github.com/oschwald/maxminddb-golang v1.2.1/go.mod h1:3jhIUymTJ5VREKyIhWm66LJiQt04F0UCDdodShpjWsY=
golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

43
vendor/vendor.json vendored
View File

@ -1,43 +0,0 @@
{
"comment": "",
"ignore": "test",
"package": [
{
"checksumSHA1": "OH94abBdbmoVqyRqYBfgUT9N494=",
"path": "github.com/jessevdk/go-flags",
"revision": "1c38ed7ad0cc3d9e66649ac398c30e45f395c4eb",
"revisionTime": "2018-03-31T12:42:32Z"
},
{
"checksumSHA1": "um5Gw7FZwz/GoxIXVIlSL1NigXk=",
"path": "github.com/oschwald/geoip2-golang",
"revision": "5b1dc16861f81d05d9836bb21c2d0d65282fc0b8",
"revisionTime": "2017-04-23T21:58:58Z"
},
{
"checksumSHA1": "hRW1mYxnRGfMCm0g7DfkFMUAtpg=",
"path": "github.com/oschwald/maxminddb-golang",
"revision": "8727e98aa1b91610eb184ed1ab615943b8d9deb0",
"revisionTime": "2018-01-03T00:51:53Z"
},
{
"checksumSHA1": "osb18zDjd7/RMAMUuN3qP+w0ewE=",
"path": "golang.org/x/sys/unix",
"revision": "37707fdb30a5b38865cfb95e5aab41707daec7fd",
"revisionTime": "2018-02-02T13:35:31Z"
},
{
"checksumSHA1": "eQq+ZoTWPjyizS9XalhZwfGjQao=",
"path": "golang.org/x/sys/windows",
"revision": "37707fdb30a5b38865cfb95e5aab41707daec7fd",
"revisionTime": "2018-02-02T13:35:31Z"
}
],
"rootPath": "github.com/mpolden/echoip",
"heroku": {
"install": [
"./..."
],
"goVersion": "go1.10.3"
}
}