diff --git a/.travis.yml b/.travis.yml index 4a4ab81..b80b257 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi install: - - if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make install; fi + - if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi - if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi - if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi diff --git a/Makefile b/Makefile index 51a6b91..e69dbd8 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,10 @@ GO ?= go GOFMT ?= gofmt "-s" -PACKAGES ?= $(shell $(GO) list ./... | grep -v /vendor/) -VETPACKAGES ?= $(shell $(GO) list ./... | grep -v /vendor/ | grep -v /examples/) -GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*") +PACKAGES ?= $(shell $(GO) list ./...) +VETPACKAGES ?= $(shell $(GO) list ./... | grep -v /examples/) +GOFILES := $(shell find . -name "*.go") TESTFOLDER := $(shell $(GO) list ./... | grep -E 'gin$$|binding$$|render$$' | grep -v examples) -all: install - -install: deps - govendor sync - .PHONY: test test: echo "mode: count" > coverage.out @@ -48,11 +43,6 @@ fmt-check: vet: $(GO) vet $(VETPACKAGES) -deps: - @hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - $(GO) get -u github.com/kardianos/govendor; \ - fi - .PHONY: lint lint: @hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ diff --git a/README.md b/README.md index 3f2d3c2..012152a 100644 --- a/README.md +++ b/README.md @@ -88,44 +88,6 @@ import "github.com/gin-gonic/gin" import "net/http" ``` -### Use a vendor tool like [Govendor](https://github.com/kardianos/govendor) - -1. `go get` govendor - -```sh -$ go get github.com/kardianos/govendor -``` -2. Create your project folder and `cd` inside - -```sh -$ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_" -``` - -If you are on a Mac and you're installing Go 1.8 (released: Feb 2017) or later, GOPATH is automatically determined by the Go toolchain for you. It defaults to $HOME/go on macOS so you can create your project like this - -```sh -$ mkdir -p $HOME/go/src/github.com/myusername/project && cd "$_" -``` - -3. Vendor init your project and add gin - -```sh -$ govendor init -$ govendor fetch github.com/gin-gonic/gin@v1.3 -``` - -4. Copy a starting template inside your project - -```sh -$ curl https://raw.githubusercontent.com/gin-gonic/examples/master/basic/main.go > main.go -``` - -5. Run your project - -```sh -$ go run main.go -``` - ## Quick start ```sh diff --git a/vendor/vendor.json b/vendor/vendor.json deleted file mode 100644 index 70b2d9e..0000000 --- a/vendor/vendor.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "comment": "v1.4.0", - "ignore": "test", - "package": [ - { - "checksumSHA1": "CSPbwbyzqA6sfORicn4HFtIhF/c=", - "path": "github.com/davecgh/go-spew/spew", - "revision": "8991bc29aa16c548c550c7ff78260e27b9ab7c73", - "revisionTime": "2018-02-21T22:46:20Z", - "version": "v1.1", - "versionExact": "v1.1.1" - }, - { - "checksumSHA1": "qlEzrgKgIkh7y0ePm9BNo1cNdXo=", - "path": "github.com/gin-contrib/sse", - "revision": "54d8467d122d380a14768b6b4e5cd7ca4755938f", - "revisionTime": "2019-06-02T15:02:53Z", - "version": "v0.1", - "versionExact": "v0.1.0" - }, - { - "checksumSHA1": "b4DmyMT9bicTRVJw1hJXHLhIH+0=", - "path": "github.com/go-playground/locales", - "revision": "f63010822830b6fe52288ee52d5a1151088ce039", - "revisionTime": "2018-03-23T16:04:04Z", - "version": "v0.12", - "versionExact": "v0.12.1" - }, - { - "checksumSHA1": "JgF260rC9YpWyY5WEljjimWLUXs=", - "path": "github.com/go-playground/locales/currency", - "revision": "630ebbb602847eba93e75ae38bbc7bb7abcf1ff3", - "revisionTime": "2019-04-30T15:33:29Z" - }, - { - "checksumSHA1": "9pKcUHBaVS+360X6h4IowhmOPjk=", - "path": "github.com/go-playground/universal-translator", - "revision": "b32fa301c9fe55953584134cb6853a13c87ec0a1", - "revisionTime": "2017-02-09T16:11:52Z", - "version": "v0.16", - "versionExact": "v0.16.0" - }, - { - "checksumSHA1": "Y2MOwzNZfl4NRNDbLCZa6sgx7O0=", - "path": "github.com/golang/protobuf/proto", - "revision": "c823c79ea1570fb5ff454033735a8e68575d1d0f", - "revisionTime": "2019-02-05T22:20:52Z", - "version": "v1.3", - "versionExact": "v1.3.0" - }, - { - "checksumSHA1": "zNo6yGy/bCJuzkEcP70oEBtOB2M=", - "path": "github.com/leodido/go-urn", - "revision": "70078a794e8ea4b497ba7c19a78cd60f90ccf0f4", - "revisionTime": "2018-05-24T03:26:21Z", - "version": "v1.1", - "versionExact": "v1.1.0" - }, - { - "checksumSHA1": "TB2vxux9xQbvsTHOVt4aRTuvSn4=", - "path": "github.com/json-iterator/go", - "revision": "0ff49de124c6f76f8494e194af75bde0f1a49a29", - "revisionTime": "2019-03-06T14:29:09Z", - "version": "v1.1", - "versionExact": "v1.1.6" - }, - { - "checksumSHA1": "Ya+baVBU/RkXXUWD3LGFmGJiiIg=", - "path": "github.com/mattn/go-isatty", - "revision": "c2a7a6ca930a4cd0bc33a3f298eb71960732a3a7", - "revisionTime": "2019-03-12T13:58:54Z", - "version": "v0.0", - "versionExact": "v0.0.7" - }, - { - "checksumSHA1": "ZTcgWKWHsrX0RXYVXn5Xeb8Q0go=", - "path": "github.com/modern-go/concurrent", - "revision": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94", - "revisionTime": "2018-03-06T01:26:44Z" - }, - { - "checksumSHA1": "qvH48wzTIV3QKSDqI0dLFtVjaDI=", - "path": "github.com/modern-go/reflect2", - "revision": "94122c33edd36123c84d5368cfb2b69df93a0ec8", - "revisionTime": "2018-07-18T01:23:57Z" - }, - { - "checksumSHA1": "LuFv4/jlrmFNnDb/5SCSEPAM9vU=", - "path": "github.com/pmezard/go-difflib/difflib", - "revision": "5d4384ee4fb2527b0a1256a821ebfc92f91efefc", - "revisionTime": "2018-12-26T10:54:42Z" - }, - { - "checksumSHA1": "cpNsoLqBprpKh+VZTBOZNVXzBEk=", - "path": "github.com/stretchr/objx", - "revision": "c61a9dfcced1815e7d40e214d00d1a8669a9f58c", - "revisionTime": "2019-02-11T16:23:28Z" - }, - { - "checksumSHA1": "DBdcVxnvaINHhWyyGgih/Mel6gE=", - "path": "github.com/stretchr/testify", - "revision": "ffdc059bfe9ce6a4e144ba849dbedead332c6053", - "revisionTime": "2018-12-05T02:12:43Z", - "version": "v1.3", - "versionExact": "v1.3.0" - }, - { - "checksumSHA1": "c6pbpF7eowwO59phRTpF8cQ80Z0=", - "path": "github.com/stretchr/testify/assert", - "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", - "revisionTime": "2018-05-06T18:05:49Z", - "version": "v1.2", - "versionExact": "v1.2.2" - }, - { - "checksumSHA1": "wnEANt4k5X/KGwoFyfSSnpxULm4=", - "path": "github.com/stretchr/testify/require", - "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", - "revisionTime": "2018-05-06T18:05:49Z" - }, - { - "checksumSHA1": "S4ei9eSqVThDio0Jn2sav6yUbvg=", - "path": "github.com/ugorji/go/codec", - "revision": "82dbfaf494e3b01d2d481376f11f6a5c8cf9599f", - "revisionTime": "2019-07-02T14:15:27Z", - "version": "v1.1", - "versionExact": "v1.1.6" - }, - { - "checksumSHA1": "2gaep1KNRDNyDA3O+KgPTQsGWvs=", - "path": "golang.org/x/sys/unix", - "revision": "a43fa875dd822b81eb6d2ad538bc1f4caba169bd", - "revisionTime": "2019-05-02T15:41:39Z" - }, - { - "checksumSHA1": "ACzc7AkwLtNgKhqtj8V7SGUJgnw=", - "path": "gopkg.in/go-playground/validator.v9", - "revision": "46b4b1e301c24cac870ffcb4ba5c8a703d1ef475", - "revisionTime": "2019-03-31T13:31:25Z", - "version": "v9.28", - "versionExact": "v9.28.0" - }, - { - "checksumSHA1": "QqDq2x8XOU7IoOR98Cx1eiV5QY8=", - "path": "gopkg.in/yaml.v2", - "revision": "51d6538a90f86fe93ac480b35f37b2be17fef232", - "revisionTime": "2018-11-15T11:05:04Z", - "version": "v2.2", - "versionExact": "v2.2.2" - } - ], - "rootPath": "github.com/gin-gonic/gin" -}