Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
drop support govendor (#2148)
  • Loading branch information
thinkerou committed Nov 25, 2019
1 parent e90e2ba commit 3c8e29b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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

Expand Down
16 changes: 3 additions & 13 deletions 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
Expand Down Expand Up @@ -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 \
Expand Down
38 changes: 0 additions & 38 deletions README.md
Expand Up @@ -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
Expand Down
153 changes: 0 additions & 153 deletions vendor/vendor.json

This file was deleted.

0 comments on commit 3c8e29b

Please sign in to comment.