Trivial fixes in core/pkg/net

- Simplify util method IsIPV6
- Skip ';'-prefixed lines in /etc/resolv.conf as comment
This commit is contained in:
Anfernee Gui 2017-08-22 10:41:07 -07:00
parent a392f29956
commit 99227da063
3 changed files with 5 additions and 9 deletions

View file

@ -40,6 +40,8 @@ func TestGetDNSServers(t *testing.T) {
defer os.Remove(file.Name())
ioutil.WriteFile(file.Name(), []byte(`
# comment
; comment
nameserver 2001:4860:4860::8844
nameserver 2001:4860:4860::8888
nameserver 8.8.8.8