feat: Add request id middleware test

This commit is contained in:
Muyao CHEN
2024-10-03 13:41:32 +02:00
parent e45f4d992f
commit 7024c76032
4 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,9 @@
package middleware
import "github.com/gin-gonic/gin"
func RequestID() gin.HandlerFunc {
return func(ctx *gin.Context) {
ctx.Set("X-Request-Id", "123")
}
}