From a87101d1ea998d567db06a123fd62d543d4e95e7 Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Sun, 10 Oct 2021 10:42:28 +0300 Subject: [PATCH] refac: var -> const --- repositories/structs.go | 6 +++--- utils/utils.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repositories/structs.go b/repositories/structs.go index 541f08f..201dd9c 100644 --- a/repositories/structs.go +++ b/repositories/structs.go @@ -57,6 +57,6 @@ type BadRequestHtmlData struct { Message string } -var InvalidTitleOrTextErrorMessage = "TITLE OR TEXT SHOULD NOT BE EMPTY" -var InvalidCaptchaErrorMessage = "INVALID CAPTCHA" -var InvalidFileSizeMessage = "FILE SIZE EXCIDED (3MB PER FILE)" +const InvalidTitleOrTextErrorMessage = "TITLE OR TEXT SHOULD NOT BE EMPTY" +const InvalidCaptchaErrorMessage = "INVALID CAPTCHA" +const InvalidFileSizeMessage = "FILE SIZE EXCIDED (3MB PER FILE)" diff --git a/utils/utils.go b/utils/utils.go index 96901bf..b34a57d 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -13,8 +13,8 @@ import ( "github.com/disintegration/imaging" ) -var UPLOADS_DIR_PATH = "uploads" -var FILE_SIZE_IN_BYTES = 3145728 // 3MB +const UPLOADS_DIR_PATH = "uploads" +const FILE_SIZE_IN_BYTES = 3145728 // 3MB // Check dir existence. func CheckIfFolderExists(path string) bool {