Merge pull request #2 from paulkramme/fix-windows-support

Add trimsuffix to remove windows line endings
This commit is contained in:
Michael Bang 2017-12-29 14:03:51 +01:00 committed by GitHub
commit 03454839a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ func main() {
fmt.Println(err) fmt.Println(err)
return return
} }
input = strings.TrimSuffix(input, "\r\n")
input = strings.Trim(input[:len(input)-1], " ") input = strings.Trim(input[:len(input)-1], " ")
if input == ".exit" { if input == ".exit" {
break break