From 7c77e450ccbf1459b4628f3564aeb0a0482b08f1 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 28 Apr 2010 19:36:04 -0700 Subject: [PATCH] net: do not require newline at end of resolv.conf Fixes #686. R=adg CC=golang-dev https://golang.org/cl/961046 --- src/pkg/net/parse.go | 5 +++++ 1 file changed, 5 insertions(+) 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 } -- 2.50.0