logger.go
482 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/server/web/context"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/redis"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
)
func init() {
//日志输出
web.Router("/log", &controllers.LoggerController{}, "Get:Output")
//
web.Get("/test1", func(ctx *context.Context) {
s := redis.RunDemoScript()
ctx.WriteString(s)
})
}