mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 19:09:57 +08:00
Merge branch 'master' into https_example
This commit is contained in:
commit
cb9f60afee
BIN
examples/favicon/favicon.ico
Normal file
BIN
examples/favicon/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
15
examples/favicon/main.go
Normal file
15
examples/favicon/main.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/thinkerou/favicon"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
app := gin.Default()
|
||||||
|
app.Use(favicon.New("./favicon.ico"))
|
||||||
|
app.GET("/ping", func(c *gin.Context) {
|
||||||
|
c.String(200, "Hello favicon.")
|
||||||
|
})
|
||||||
|
app.Run(":8080")
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user