k.zhang 4 vuotta sitten
vanhempi
commit
9925326422
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      routers/router.go

+ 1 - 2
routers/router.go

@@ -3,13 +3,12 @@ package routers
 import (
 	"duoduo/apis/pdd"
 	"github.com/gin-gonic/gin"
-	"net/http"
 )
 
 func InitRouter() {
 
 	r := gin.New()
-	r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "hello!") })
+	r.GET("/", func(c *gin.Context) { c.File("./root.txt") })
 	r.GET("/root.txt", func(c *gin.Context) { c.File("./root.txt") })
 	r2 := r.Group("/")
 	{