master
go 16 lines 294 Bytes
Raw
1 package dnsquery
2
3 import (
4 "os"
5
6 "github.com/docker/docker/libnetwork/resolvconf"
7 )
8
9 func getResolvConfNameservers() ([]string, error) {
10 path := resolvconf.Path()
11 bs, err := os.ReadFile(path)
12 if err != nil {
13 return nil, err
14 }
15 return resolvconf.GetNameservers(bs, resolvconf.IP), nil
16 }