Start using it

  1. Download and install it:
$ go get github.com/gin-gonic/gin
  1. Import it in your code:
import "github.com/gin-gonic/gin"
  1. (Optional) Import net/http. This is required for example if using constants such as http.StatusOK.
import "net/http"

Use a vendor tool like Govendor

  1. go get govendor
$ go get github.com/kardianos/govendor
  1. Create your project folder and cd inside
$ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_"
  1. Vendor init your project and add gin
$ govendor init
$ govendor fetch github.com/gin-gonic/[email protected]
  1. Copy a starting template inside your project
$ curl https://raw.githubusercontent.com/gin-gonic/gin/master/examples/basic/main.go > main.go
  1. Run your project
$ go run main.go

results matching ""

    No results matching ""