Merge branch 'master' of https://github.com/julienschmidt/gin into julienschmidt-master

Conflicts:
	README.md
This commit is contained in:
Manu Mtz-Almeida 2014-07-04 21:37:33 +02:00
commit e2ecb03c16
1 changed files with 178 additions and 175 deletions

View File

@ -43,6 +43,8 @@ import "github.com/gin-gonic/gin"
#### Create most basic PING/PONG HTTP endpoint
```go
package main
import "github.com/gin-gonic/gin"
func main() {
@ -267,6 +269,7 @@ You can also use your own html template render
```go
import "html/template"
func main() {
r := gin.Default()
html := template.Must(template.ParseFiles("file1", "file2"))
@ -307,7 +310,7 @@ func main() {
r.Use(Logger())
r.GET("/test", func(c *gin.Context) {
example := c.MustGet("example").(string)
example := r.Get("example").(string)
// it would print: "12345"
log.Println(example)