gin/router/register_test.go

37 lines
590 B
Go
Raw Normal View History

2024-07-20 23:39:25 +08:00
// Package router ...
//
// Description : router ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-07-20 23:24
package router
import (
"testing"
"github.com/gin-gonic/gin"
)
type TestController struct{}
func (t *TestController) RouterPrefix() string {
return "/uri/prefix"
}
func (t *TestController) RouterMiddleware() []gin.HandlerFunc {
return []gin.HandlerFunc{
func(ctx *gin.Context) {
},
}
}
func Test_parseController(t *testing.T) {
type args struct {
controller any
}
parseController(TestController{})
parseController(&TestController{})
}