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:
parent
6041c607c1
commit
c50496b07b
6
main.go
6
main.go
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user