aboutsummaryrefslogtreecommitdiffstats
path: root/golib/error.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2019-04-04 23:45:56 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2019-04-04 23:45:56 +0200
commit89ea6ebd3671e6ebbf6101525a5416427806f318 (patch)
tree5db52146365a9c2c439b77485f938cc8c2e3a727 /golib/error.go
parentee147062c3bebed83e34bf5ce71019c95f62b96f (diff)
Fixed package tree and go mod filev0.5.0
Change-Id: I1047094d5b80d0622e2c2ce674979f18207b8c0f Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'golib/error.go')
-rw-r--r--golib/error.go16
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,
- })
-}