From ac7404b6a88cee8091bf43a23c9642baaa1e6c8d Mon Sep 17 00:00:00 2001 From: Fata Nugraha Date: Thu, 9 Jan 2025 18:16:31 +0800 Subject: [PATCH] Remove blank entry in nameservers Signed-off-by: Fata Nugraha --- pkg/services/dns/dns_config_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/dns/dns_config_unix.go b/pkg/services/dns/dns_config_unix.go index 09fbe51c..1d8e1783 100644 --- a/pkg/services/dns/dns_config_unix.go +++ b/pkg/services/dns/dns_config_unix.go @@ -50,7 +50,7 @@ func getDNSHostAndPort(path string) ([]string, error) { if err != nil { return []string{}, err } - hosts := make([]string, len(conf.Servers)) + hosts := make([]string, 0, len(conf.Servers)) for _, server := range conf.Servers { dnsIP, err := netip.ParseAddr(server) if err != nil {