From 422ea4980fe194c6391824ee225541310832c288 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 6 Oct 2021 16:57:02 -0700 Subject: [PATCH] net/dns: remove a tiny wrapper function that isn't contributing anything. Signed-off-by: David Anderson --- net/dns/direct.go | 5 ----- net/dns/resolved.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/net/dns/direct.go b/net/dns/direct.go index ad1f2621b..dcf18e622 100644 --- a/net/dns/direct.go +++ b/net/dns/direct.go @@ -84,11 +84,6 @@ func (m directManager) readResolvFile(path string) (OSConfig, error) { return readResolv(bytes.NewReader(b)) } -// readResolvConf reads DNS configuration from /etc/resolv.conf. -func (m directManager) readResolvConf() (OSConfig, error) { - return m.readResolvFile(resolvConf) -} - // resolvOwner returns the apparent owner of the resolv.conf // configuration in bs - one of "resolvconf", "systemd-resolved" or // "NetworkManager", or "" if no known owner was found. diff --git a/net/dns/resolved.go b/net/dns/resolved.go index ace4908a6..f4f108a7b 100644 --- a/net/dns/resolved.go +++ b/net/dns/resolved.go @@ -68,7 +68,7 @@ func isResolvedActive() bool { return false } - config, err := newDirectManager().readResolvConf() + config, err := newDirectManager().readResolvFile(resolvConf) if err != nil { return false }