diff options
author | Russ Cox <rsc@golang.org> | 2010-04-28 19:36:04 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-04-28 19:36:04 -0700 |
commit | cf3b19bcba4731f062d43611d9742a104d5d793a (patch) | |
tree | 41c5895f437b925a01a69e2ac324ede7514d1b5a | |
parent | 0674a3a1706c9cbf452ad21045886cb8989437a9 (diff) | |
download | golang-cf3b19bcba4731f062d43611d9742a104d5d793a.tar.gz |
net: do not require newline at end of resolv.conf
Fixes issue 686.
R=adg
CC=golang-dev
http://codereview.appspot.com/961046
-rw-r--r-- | src/pkg/net/parse.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/net/parse.go b/src/pkg/net/parse.go index a7dcb35f0..ff980f412 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 } |