From 2ec9567c247d26b5db0d8d4da4e3e5926bd81800 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Wed, 20 Dec 2023 07:20:54 +0600 Subject: [PATCH] :art: Explicitly set types for common strings --- internal/common/common.go | 47 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/internal/common/common.go b/internal/common/common.go index b3c68df..dd722c1 100644 --- a/internal/common/common.go +++ b/internal/common/common.go @@ -1,34 +1,35 @@ package common const ( - MIMEApplicationForm = "application/x-www-form-urlencoded" - MIMEApplicationFormCharsetUTF8 = MIMEApplicationForm + "; " + charsetUTF8 - MIMETextHTML = "text/html" - MIMETextHTMLCharsetUTF8 = MIMETextHTML + "; " + charsetUTF8 - MIMETextPlain = "text/plain" - MIMETextPlainCharsetUTF8 = MIMETextPlain + "; " + charsetUTF8 - - charsetUTF8 = "charset=UTF-8" + MIMEApplicationForm string = "application/x-www-form-urlencoded" + MIMEApplicationFormCharsetUTF8 string = MIMEApplicationForm + "; " + charsetUTF8 + MIMETextHTML string = "text/html" + MIMETextHTMLCharsetUTF8 string = MIMETextHTML + "; " + charsetUTF8 + MIMETextPlain string = "text/plain" + MIMETextPlainCharsetUTF8 string = MIMETextPlain + "; " + charsetUTF8 ) const ( - HeaderContentType = "Content-Type" - HeaderLink = "Link" - HeaderXHubSignature = "X-Hub-Signature" - HeaderAcceptLanguage = "Accept-Language" + HeaderAcceptLanguage string = "Accept-Language" + HeaderContentType string = "Content-Type" + HeaderLink string = "Link" + HeaderXHubSignature string = "X-Hub-Signature" ) const ( - HubCallback = hub + ".callback" - HubChallenge = hub + ".challenge" - HubLeaseSeconds = hub + ".lease_seconds" - HubMode = hub + ".mode" - HubReason = hub + ".reason" - HubSecret = hub + ".secret" - HubTopic = hub + ".topic" - HubURL = hub + ".url" - - hub = "hub" + HubCallback string = hub + ".callback" + HubChallenge string = hub + ".challenge" + HubLeaseSeconds string = hub + ".lease_seconds" + HubMode string = hub + ".mode" + HubReason string = hub + ".reason" + HubSecret string = hub + ".secret" + HubTopic string = hub + ".topic" + HubURL string = hub + ".url" ) -const Und = "und" +const Und string = "und" + +const ( + hub string = "hub" + charsetUTF8 string = "charset=UTF-8" +)