mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 20:35:16 +00:00
feat:插件模式尝鲜
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package example
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type Plugin struct {
|
||||
}
|
||||
|
||||
func (*Plugin) Register(group *gin.RouterGroup) {
|
||||
group.GET("hello", func(context *gin.Context) {
|
||||
context.JSON(200, "hello world")
|
||||
})
|
||||
}
|
||||
|
||||
func (*Plugin) RouterPath() string {
|
||||
return "group"
|
||||
}
|
||||
Reference in New Issue
Block a user