From 122637f5f3622cad97e7022bc85030c0cf599b9f Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Tue, 12 Apr 2022 11:41:12 +0300 Subject: [PATCH] rename to inputs --- repositories/structs.go | 5 +++-- utils/utils.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/repositories/structs.go b/repositories/structs.go index 0dd975c..7f805a9 100644 --- a/repositories/structs.go +++ b/repositories/structs.go @@ -40,7 +40,7 @@ type File struct { // HTML Templates Structs // post-form.html -type HtmlFormErrors struct { +type Inputs struct { Title string Text string Files string @@ -51,7 +51,8 @@ type HtmlFormData struct { FirstPostID int CaptchaID string IsCaptchaActive bool - Errors HtmlFormErrors + Errors Inputs + Inputs } // index.html diff --git a/utils/utils.go b/utils/utils.go index e4b16ce..2a57e8b 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -101,8 +101,8 @@ func ValidatePost(title, text string, files []*multipart.FileHeader) string { return "" } -func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.HtmlFormErrors { - validationError := new(repositories.HtmlFormErrors) +func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.Inputs { + validationError := new(repositories.Inputs) hasErrors := false if text == "" && len(files) == 0 {