package middleware import ( "github.com/gin-gonic/gin" "github.com/go-logr/logr" "edge-infra.dev/pkg/lib/fog" ) // IntoContext sets the logger on the request context func IntoContext(log logr.Logger) gin.HandlerFunc { return func(c *gin.Context) { c.Request = c.Request.Clone(fog.IntoContext(c.Request.Context(), log)) c.Next() } }