From 0bde51b91ea505e38569ae3cbe575695abd2db60 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Wed, 12 Mar 2025 20:13:51 +0100 Subject: Refactor: Use any instead of interface{} --- web/controller/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/controller') diff --git a/web/controller/util.go b/web/controller/util.go index 440de276..40c7a8e9 100644 --- a/web/controller/util.go +++ b/web/controller/util.go @@ -31,11 +31,11 @@ func jsonMsg(c *gin.Context, msg string, err error) { jsonMsgObj(c, msg, nil, err) } -func jsonObj(c *gin.Context, obj interface{}, err error) { +func jsonObj(c *gin.Context, obj any, err error) { jsonMsgObj(c, "", obj, err) } -func jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) { +func jsonMsgObj(c *gin.Context, msg string, obj any, err error) { m := entity.Msg{ Obj: obj, } -- cgit v1.2.3