From 281d10aba3a110bf115e99d53645e06d058a585b Mon Sep 17 00:00:00 2001 From: Lennart Date: Tue, 20 Jul 2021 10:34:59 +0200 Subject: [PATCH] document web.ContentType* and web.APIError* --- web/error.go | 1 + web/response.go | 1 + 2 files changed, 2 insertions(+) diff --git a/web/error.go b/web/error.go index 42ab123..a88a51e 100644 --- a/web/error.go +++ b/web/error.go @@ -7,6 +7,7 @@ type HTTPError struct { Data interface{} `json:"data,omitempty" swaggerignore:"true"` } +// Error strings used for HTTPError.Message. const ( APIErrorInvalidRequestFormat = "Invalid Request Format" APIErrorInternalDatabase = "Internal Database Error" diff --git a/web/response.go b/web/response.go index a73bd56..698cf92 100644 --- a/web/response.go +++ b/web/response.go @@ -4,6 +4,7 @@ import ( "github.com/gin-gonic/gin" ) +// MIME type strings. const ( ContentTypeJSON = "application/json" ContentTypeJS = "application/javascript"