From e6c40f2add8e6a7c864c3b706b704a3b5d963ce7 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 17:10:23 +0000 Subject: [PATCH] [Sync Iteration] go/welcome-to-tech-palace/1 --- .../1/welcome_to_tech_palace.go | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 solutions/go/welcome-to-tech-palace/1/welcome_to_tech_palace.go diff --git a/solutions/go/welcome-to-tech-palace/1/welcome_to_tech_palace.go b/solutions/go/welcome-to-tech-palace/1/welcome_to_tech_palace.go new file mode 100644 index 0000000..89edc7c --- /dev/null +++ b/solutions/go/welcome-to-tech-palace/1/welcome_to_tech_palace.go @@ -0,0 +1,21 @@ +package techpalace +import "strings" + +// WelcomeMessage returns a welcome message for the customer. +func WelcomeMessage(customer string) string { + var person string = strings.ToUpper(customer) + return "Welcome to the Tech Palace, " + person +} + +// AddBorder adds a border to a welcome message. +func AddBorder(welcomeMsg string, numStarsPerLine int) string { + border := strings.Repeat("*",numStarsPerLine) + return border + "\n" + welcomeMsg + "\n" + border +} + +// CleanupMessage cleans up an old marketing message. +func CleanupMessage(oldMsg string) string { + oldMsg= strings.ReplaceAll(oldMsg, "*", "") + msg:= strings.TrimSpace(oldMsg) + return msg +}