Update ReadMe to reflect develop branch changes

Updated ReadMe to clarify and correct how to use develop branch of Gin .
This commit is contained in:
David Bainbridge 2017-04-18 13:13:31 -05:00 committed by GitHub
parent 957f6205c8
commit 0a384832da

View File

@ -13,7 +13,7 @@ $ cat test.go
```go ```go
package main package main
import "gopkg.in/gin-gonic/gin.v1" import "github.com/gin-gonic/gin"
func main() { func main() {
r := gin.Default() r := gin.Default()
@ -68,7 +68,7 @@ BenchmarkZeus_GithubAll | 2000 | 944234 | 300688 | 2648
(3): Heap Memory (B/op) (3): Heap Memory (B/op)
(4): Average Allocations per Repetition (allocs/op) (4): Average Allocations per Repetition (allocs/op)
## Gin v1. stable ## Gin v1.2 develop
- [x] Zero allocation router. - [x] Zero allocation router.
- [x] Still the fastest http router and framework. From routing to writing. - [x] Still the fastest http router and framework. From routing to writing.
@ -78,17 +78,18 @@ BenchmarkZeus_GithubAll | 2000 | 944234 | 300688 | 2648
## Start using it ## Start using it
Note: [govendor](https://github.com/kardianos/govendor) is used by Gin for dependency management.
1. Download and install it: 1. Download and install Gin:
```sh ```sh
$ go get gopkg.in/gin-gonic/gin.v1 $ govendor fetch github.com/gin-gonic/gin@=develop
``` ```
2. Import it in your code: 2. Import it in your code:
```go ```go
import "gopkg.in/gin-gonic/gin.v1" import "github.com/gin-gonic/gin"
``` ```
3. (Optional) Import `net/http`. This is required for example if using constants such as `http.StatusOK`. 3. (Optional) Import `net/http`. This is required for example if using constants such as `http.StatusOK`.
@ -97,14 +98,6 @@ import "gopkg.in/gin-gonic/gin.v1"
import "net/http" import "net/http"
``` ```
4. (Optional) Use latest changes (note: they may be broken and/or unstable):
```sh
$ GIN_PATH=$GOPATH/src/gopkg.in/gin-gonic/gin.v1
$ git -C $GIN_PATH checkout develop
$ git -C $GIN_PATH pull origin develop
```
## API Examples ## API Examples
### Using GET, POST, PUT, PATCH, DELETE and OPTIONS ### Using GET, POST, PUT, PATCH, DELETE and OPTIONS