From: Russ Cox Date: Thu, 29 Apr 2010 02:36:04 +0000 (-0700) Subject: net: do not require newline at end of resolv.conf X-Git-Tag: weekly.2010-05-04~50 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7c77e450ccbf1459b4628f3564aeb0a0482b08f1;p=gostls13.git net: do not require newline at end of resolv.conf Fixes #686. R=adg CC=golang-dev https://golang.org/cl/961046 --- diff --git a/src/pkg/net/parse.go b/src/pkg/net/parse.go index a7dcb35f0e..ff980f412e 100644 --- a/src/pkg/net/parse.go +++ b/src/pkg/net/parse.go @@ -35,6 +35,11 @@ func (f *file) getLineFromData() (s string, ok bool) { return } } + if len(f.data) > 0 { + s = string(data) + f.data = nil + ok = true + } return }