gin-blog/internal/middleware/app_info.go

12 lines
203 B
Go

package middleware
import "github.com/gin-gonic/gin"
func AppInfo() gin.HandlerFunc {
return func(c *gin.Context) {
c.Set("app_name", "blog-service")
c.Set("app_version", "1.0.0")
c.Next()
}
}