fasten-onprem/backend/pkg/web/middleware/config.go

14 lines
262 B
Go
Raw Normal View History

2022-08-22 18:51:46 -06:00
package middleware
import (
"github.com/gin-gonic/gin"
"github.com/packagrio/goweb-template/backend/pkg/config"
)
func ConfigMiddleware(appConfig config.Interface) gin.HandlerFunc {
return func(c *gin.Context) {
c.Set("CONFIG", appConfig)
c.Next()
}
}