diff options
Diffstat (limited to 'golib/error.go')
-rw-r--r-- | golib/error.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/golib/error.go b/golib/error.go deleted file mode 100644 index 6873d82..0000000 --- a/golib/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, - }) -} |