From 66112d415872a9b3f76b78a0d3e7fc652bd0f7e1 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Mon, 6 Jun 2022 13:11:59 -0700 Subject: [PATCH] bug fix #11 --- controllers/authController.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/authController.go b/controllers/authController.go index 807011c..21a3e97 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -44,6 +44,11 @@ func NewSystem() { fmt.Print("Password: ") password, _ := gopass.GetPasswd() + // Clear values of new lines + firstname = strings.ReplaceAll(firstname, "\n", "") + lastname = strings.ReplaceAll(lastname, "\n", "") + email = strings.ReplaceAll(email, "\n", "") + var admin models.Admin admin.FirstName = strings.TrimSuffix(firstname, "\n") admin.LastName = strings.TrimSuffix(lastname, "\n")