From 9c476f5d1f6bd6d40287c05872d179454c12cae5 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Sun, 5 Feb 2023 13:42:16 +0000 Subject: [PATCH] Remove trailing newlines from responses --- projects/output-and-error-handling/server/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/output-and-error-handling/server/main.go b/projects/output-and-error-handling/server/main.go index 26f82aa67..10fa17b00 100644 --- a/projects/output-and-error-handling/server/main.go +++ b/projects/output-and-error-handling/server/main.go @@ -16,9 +16,9 @@ func main() { switch randomNumber { // 50% of the time, we just report the weather. 30% nice, 20% less so. case 0, 1, 2: - w.Write([]byte("Today it will be sunny!\n")) + w.Write([]byte("Today it will be sunny!")) case 3, 4: - w.Write([]byte("I'd bring an umbrella, just in case...\n")) + w.Write([]byte("I'd bring an umbrella, just in case...")) // 30% of the time, we say we're too busy and say try again in a few seconds, in a few different ways. case 5: // Generate a random number between 1 and 10, for the number of seconds to tell the client to wait before retrying: