From 523761dc9c5954dc0d4af9435edb0c2a6e3acc7e Mon Sep 17 00:00:00 2001 From: daheige Date: Wed, 21 Apr 2021 23:30:51 +0800 Subject: [PATCH] code style adjust --- render/json.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/render/json.go b/render/json.go index 41863093..e25415b0 100644 --- a/render/json.go +++ b/render/json.go @@ -46,9 +46,11 @@ type PureJSON struct { Data interface{} } -var jsonContentType = []string{"application/json; charset=utf-8"} -var jsonpContentType = []string{"application/javascript; charset=utf-8"} -var jsonAsciiContentType = []string{"application/json"} +var ( + jsonContentType = []string{"application/json; charset=utf-8"} + jsonpContentType = []string{"application/javascript; charset=utf-8"} + jsonAsciiContentType = []string{"application/json"} +) // Render (JSON) writes data with custom ContentType. func (r JSON) Render(w http.ResponseWriter) (err error) {