From 435112fefe7986076b3fc2dd6718a5cc2f68dbbd Mon Sep 17 00:00:00 2001 From: James Mills Date: Mon, 12 Jun 2017 23:56:28 -0700 Subject: [PATCH] Fix for servers/gophermap with bad line endings e.g: gopher://pollett.org/ --- gopher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gopher.go b/gopher.go index 38fb1a8..393e983 100644 --- a/gopher.go +++ b/gopher.go @@ -385,7 +385,7 @@ func (i *Item) FetchDirectory() (Directory, error) { scanner.Split(bufio.ScanLines) for scanner.Scan() { - line := scanner.Text() + line := strings.Trim(scanner.Text(), "\r\n") if len(line) == 0 { continue