diff --git a/.gitignore b/.gitignore index 56abde5..5022fb8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /data/ /custom.html -/vendor/* -!/vendor/vendor.json +/vendor/ diff --git a/.travis.yml b/.travis.yml index 80f2a92..32090e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index 60a2441..d840170 100644 --- a/Makefile +++ b/Makefile @@ -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 ./... diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d6ab659 --- /dev/null +++ b/go.mod @@ -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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..1d32d93 --- /dev/null +++ b/go.sum @@ -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= diff --git a/vendor/vendor.json b/vendor/vendor.json deleted file mode 100644 index 3da2c3b..0000000 --- a/vendor/vendor.json +++ /dev/null @@ -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" - } -}