More gracefully deals with gophermap errors
This commit is contained in:
parent
6dfa2c52bb
commit
9d4b5a2763
|
@ -111,9 +111,12 @@ func splitGopherLine(l string) gopherLine {
|
|||
out.text = parts[0][1:]
|
||||
out.text = strings.TrimRight(parts[0][1:], "\n\r ")
|
||||
}
|
||||
if len(parts) > 1 {
|
||||
if len(parts) >= 4 {
|
||||
out.url = "gopher://" + parts[2] + ":" + parts[3] + "/" + string(out.gType) + parts[1]
|
||||
}
|
||||
} else {
|
||||
out.gType = 'i'
|
||||
out.text = ""
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue