From 4c3f63819fb56bd4bbc7be7f14c94972e57ab059 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:41:38 +0000 Subject: [PATCH] [Sync Iteration] go/party-robot/1 --- solutions/go/party-robot/1/party_robot.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 solutions/go/party-robot/1/party_robot.go diff --git a/solutions/go/party-robot/1/party_robot.go b/solutions/go/party-robot/1/party_robot.go new file mode 100644 index 0000000..db90c2f --- /dev/null +++ b/solutions/go/party-robot/1/party_robot.go @@ -0,0 +1,17 @@ +package partyrobot +import "fmt" + +// Welcome greets a person by name. +func Welcome(name string) string { + return fmt.Sprintf("Welcome to my party, %s!", name) +} + +// HappyBirthday wishes happy birthday to the birthday person and exclaims their age. +func HappyBirthday(name string, age int) string { + return fmt.Sprintf("Happy birthday %s! You are now %d years old!", name, age) +} + +// AssignTable assigns a table to each guest. +func AssignTable(name string, table int, neighbor, direction string, distance float64) string { + return fmt.Sprintf("Welcome to my party, %s!\nYou have been assigned to table %03d. Your table is %s, exactly %.1f meters from here.\nYou will be sitting next to %s.", name, table, direction, distance, neighbor) +}