zgin.go 271 Bytes
Newer Older
Vladimir Barsukov's avatar
Vladimir Barsukov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package zgin

import "github.com/gin-gonic/gin"

func New() *gin.Engine {
	return gin.New()
}

func Default() *gin.Engine {
	return gin.Default()
}

func Ok(c *gin.Context, obj any) {
	c.JSON(200, obj)
}

func Err(c *gin.Context, err error) {
	c.JSON(400, err.Error())
}