diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-06-26 18:54:13 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-06-26 18:54:13 +0200 |
commit | ea3b17feb2eb2d54bbc27dc75eee60bd1fe67d27 (patch) | |
tree | 2b5039efbee54eb6f2f0c8605ad3d6f8bca4c284 /lib/common/error.go | |
parent | 2d3e49e1e92206147b6ab7b191e525fa3ac6f2a5 (diff) |
Use xds-common go library.
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, - }) -} |