2024-09-25 13:31:37 +02:00
|
|
|
package middleware
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
2024-09-28 11:13:18 +02:00
|
|
|
"github.com/gin-gonic/gin"
|
2024-09-25 13:31:37 +02:00
|
|
|
)
|
|
|
|
|
2024-09-28 11:13:18 +02:00
|
|
|
func Test1() gin.HandlerFunc {
|
|
|
|
return func(c *gin.Context) {
|
2024-09-25 13:31:37 +02:00
|
|
|
log.Println("middleware test1 pre")
|
|
|
|
c.Next()
|
|
|
|
log.Println("middleware test1 post")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-28 11:13:18 +02:00
|
|
|
func Test2() gin.HandlerFunc {
|
|
|
|
return func(c *gin.Context) {
|
2024-09-25 13:31:37 +02:00
|
|
|
log.Println("middleware test2 pre")
|
|
|
|
c.Next()
|
|
|
|
log.Println("middleware test2 post")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-28 11:13:18 +02:00
|
|
|
func Test3() gin.HandlerFunc {
|
|
|
|
return func(c *gin.Context) {
|
2024-09-25 13:31:37 +02:00
|
|
|
log.Println("middleware test3 pre")
|
|
|
|
c.Next()
|
|
|
|
log.Println("middleware test3 post")
|
|
|
|
}
|
|
|
|
}
|