mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
Merge 3a391685bac007101d69081a846afbd50a196bb7 into e2212d40c62a98b388a5eb48ecbdcf88534688ba
This commit is contained in:
commit
cbb1029995
17
README.md
17
README.md
@ -1,12 +1,7 @@
|
||||
|
||||
#Gin Web Framework
|
||||
# Gin Web Framework
|
||||
|
||||
<img align="right" src="https://raw.githubusercontent.com/gin-gonic/gin/master/logo.jpg">
|
||||
[](https://travis-ci.org/gin-gonic/gin)
|
||||
[](https://codecov.io/gh/gin-gonic/gin)
|
||||
[](https://goreportcard.com/report/github.com/gin-gonic/gin)
|
||||
[](https://godoc.org/github.com/gin-gonic/gin)
|
||||
[](https://gitter.im/gin-gonic/gin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
<img align="right" src="https://raw.githubusercontent.com/gin-gonic/gin/master/logo.jpg"> [](https://travis-ci.org/gin-gonic/gin) [](https://codecov.io/gh/gin-gonic/gin) [](https://goreportcard.com/report/github.com/gin-gonic/gin) [](https://godoc.org/github.com/gin-gonic/gin) [](https://gitter.im/gin-gonic/gin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Gin is a web framework written in Go (Golang). It features a martini-like API with much better performance, up to 40 times faster thanks to [httprouter](https://github.com/julienschmidt/httprouter). If you need performance and good productivity, you will love Gin.
|
||||
|
||||
@ -133,7 +128,7 @@ func main() {
|
||||
func main() {
|
||||
router := gin.Default()
|
||||
|
||||
// This handler will match /user/john but will not match neither /user/ or /user
|
||||
// This handler will match /user/john but will not match /user/ or /user
|
||||
router.GET("/user/:name", func(c *gin.Context) {
|
||||
name := c.Param("name")
|
||||
c.String(http.StatusOK, "Hello %s", name)
|
||||
@ -372,7 +367,7 @@ func main() {
|
||||
```
|
||||
|
||||
|
||||
###Multipart/Urlencoded binding
|
||||
### Multipart/Urlencoded binding
|
||||
```go
|
||||
package main
|
||||
|
||||
@ -450,7 +445,7 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
####Serving static files
|
||||
#### Serving static files
|
||||
|
||||
```go
|
||||
func main() {
|
||||
@ -464,7 +459,7 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
####HTML rendering
|
||||
#### HTML rendering
|
||||
|
||||
Using LoadHTMLTemplates()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user