32 lines
535 B
Go
32 lines
535 B
Go
package middleware
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Test1() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
log.Println("middleware test1 pre")
|
|
c.Next()
|
|
log.Println("middleware test1 post")
|
|
}
|
|
}
|
|
|
|
func Test2() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
log.Println("middleware test2 pre")
|
|
c.Next()
|
|
log.Println("middleware test2 post")
|
|
}
|
|
}
|
|
|
|
func Test3() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
log.Println("middleware test3 pre")
|
|
c.Next()
|
|
log.Println("middleware test3 post")
|
|
}
|
|
}
|