1
0
mirror of https://github.com/golang/go synced 2024-11-22 08:04:39 -07:00

net: do not require newline at end of resolv.conf

Fixes #686.

R=adg
CC=golang-dev
https://golang.org/cl/961046
This commit is contained in:
Russ Cox 2010-04-28 19:36:04 -07:00
parent 0485ba72c3
commit 7c77e450cc

View File

@ -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
}