|
@@ -88,13 +88,13 @@ BenchmarkZeus_GithubAll | 2000 | 944234 | 300688 | 2648
|
|
|
1. Download and install it:
|
|
1. Download and install it:
|
|
|
|
|
|
|
|
```sh
|
|
```sh
|
|
|
-$ go get gopkg.in/gin-gonic/gin.v1
|
|
|
|
|
|
|
+$ go get github.com/gin-gonic/gin
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
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`.
|
|
@@ -103,14 +103,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
|
|
@@ -457,7 +449,7 @@ func startPage(c *gin.Context) {
|
|
|
package main
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
- "gopkg.in/gin-gonic/gin.v1"
|
|
|
|
|
|
|
+ "github.com/gin-gonic/gin"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
type LoginForm struct {
|
|
type LoginForm struct {
|