From 3e2708a15bfbe988eb1d1b276dee1e96f95c91c5 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 11:44:22 +0000 Subject: [PATCH] [Sync Iteration] go/welcome-to-tech-palace/1 --- .../1/welcome_to_tech_palace.go | 19 +++++++++++++++++++ 1 file changed, 19 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..69f31b1 --- /dev/null +++ b/solutions/go/welcome-to-tech-palace/1/welcome_to_tech_palace.go @@ -0,0 +1,19 @@ +package techpalace +import "strings" +// WelcomeMessage returns a welcome message for the customer. +func WelcomeMessage(customer string) string { + return "Welcome to the Tech Palace, " + strings.ToUpper(customer) +} + +// AddBorder adds a border to a welcome message. +func AddBorder(welcomeMsg string, numStarsPerLine int) string { + starredLine := strings.Repeat("*", numStarsPerLine) + return starredLine + "\n" + welcomeMsg + "\n" + starredLine +} + +// CleanupMessage cleans up an old marketing message. +func CleanupMessage(oldMsg string) string { + cleaned := strings.ReplaceAll(oldMsg,"*", " ") + trimmed := strings.TrimSpace(cleaned) + return trimmed +}