From e93b9580c3cb323e935a066f8703b0b3656ceae1 Mon Sep 17 00:00:00 2001 From: nochill Date: Thu, 6 Apr 2023 12:51:27 +0700 Subject: [PATCH] add base api response --- api/response.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 api/response.go diff --git a/api/response.go b/api/response.go new file mode 100644 index 0000000..cd78ab4 --- /dev/null +++ b/api/response.go @@ -0,0 +1,10 @@ +package api + +import "github.com/gin-gonic/gin" + +func BaseApiRespond(msg string, data interface{}) gin.H { + return gin.H{ + "message": msg, + "data": data, + } +}