标签:net star user com username pac run edit ble
package main
import (
"github.com/gin-gonic/gin"
"net/http"
)
func main() { //代码块
router := gin.Default()
v1:=router.Group("/v1/topics")
{
v1.GET("", func(context *gin.Context) {
context.String(http.StatusOK,"获取帖子列表")
})
v1.GET("/:topic_id", func(c *gin.Context) {
c.String(http.StatusOK,"获取用户名=%s的帖子列表",c.Query("username"))
})
router.Run()
}
}
标签:net star user com username pac run edit ble
原文地址:https://www.cnblogs.com/hualou/p/12071045.html