From 87d38405ae794f620204ba0160ffe93f91b22cef Mon Sep 17 00:00:00 2001 From: Greg Wedow <greg@wedow.cc> Date: Sun, 21 Aug 2016 12:17:30 -0400 Subject: [PATCH] motd: Don't trim surrounding whitespace from the --motd file input. --- cmd/ssh-chat/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ssh-chat/cmd.go b/cmd/ssh-chat/cmd.go index 055f281..7c7d000 100644 --- a/cmd/ssh-chat/cmd.go +++ b/cmd/ssh-chat/cmd.go @@ -152,7 +152,7 @@ func main() { if err != nil { fail(7, "Failed to load MOTD file: %v\n", err) } - motdString := strings.TrimSpace(string(motd)) + motdString := string(motd) // hack to normalize line endings into \r\n motdString = strings.Replace(motdString, "\r\n", "\n", -1) motdString = strings.Replace(motdString, "\n", "\r\n", -1)