diff options
Diffstat (limited to 'lib/common/error.go')
-rw-r--r-- | lib/common/error.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/common/error.go b/lib/common/error.go deleted file mode 100644 index 6873d82..0000000 --- a/lib/common/error.go +++ /dev/null @@ -1,16 +0,0 @@ -package common - -import ( - "fmt" - - "github.com/gin-gonic/gin" -) - -// APIError returns an uniform json formatted error -func APIError(c *gin.Context, format string, args ...interface{}) { - errMsg := fmt.Sprintf(format, args...) - c.JSON(500, gin.H{ - "status": "error", - "error": errMsg, - }) -} |