remove unneeded code

This commit is contained in:
wwqgtxx 2024-09-11 15:57:56 +08:00
parent 262a6b563c
commit cfe71bbe60

View File

@ -7,14 +7,6 @@ import (
) )
func NotifyDnsChanged(dnsList string) { func NotifyDnsChanged(dnsList string) {
dL := strings.Split(dnsList, ",") dns.UpdateSystemDNS(strings.Split(dnsList, ","))
ns := make([]dns.NameServer, 0, len(dnsList))
for _, d := range dL {
ns = append(ns, dns.NameServer{Addr: d})
}
dns.UpdateSystemDNS(dL)
dns.FlushCacheWithDefaultResolver() dns.FlushCacheWithDefaultResolver()
} }