其他分享
首页 > 其他分享> > gin路由

gin路由

作者:互联网

gin路由

// svrGIN project main.go
package main

//cxg 2022-7-29
import (
    "svrGIN/dal"

    "github.com/gin-gonic/gin"
)

func main() {
    r := gin.Default()
    rest := r.Group("/rest")
    {
        rest.POST("/units/select/*where", dal.SelectUnits)
        rest.POST("/units/insert/", dal.InsertUnits)
        rest.POST("/units/update/", dal.UpdateUnits)
        rest.POST("/units/delete/*where", dal.DeleteUnits)
    }
    r.Run(":8000")
}

 

标签:dal,rest,units,gin,POST,main,路由
来源: https://www.cnblogs.com/hnxxcxg/p/16533686.html