add newline to end of line

git-svn-id: file:///srv/svn/repo/tokiko/trunk@5 8f5ca974-a7f8-e144-9f80-d41d5039c194
This commit is contained in:
shokara 2021-12-23 19:11:13 +00:00
parent 6041c607c1
commit c50496b07b

View File

@ -16,7 +16,9 @@ const HOSTNAME = "demiurge.shoko.home"
const DIR = "./"
func formatLine(line string) string {
splitted := strings.Split(line, "\t")
trimmed := strings.TrimRight(line, "\r\n")
splitted := strings.Split(trimmed, "\t")
if len(splitted) == 3 {
return line
} else if len(splitted) == 2 {
@ -25,7 +27,7 @@ func formatLine(line string) string {
line += "\tErr\t" + HOSTNAME + "\t" + PORT
}
return line
return line + "\n"
}
func writeError(c net.Conn, msg string) {