diff --git a/cmd/compute-domain-daemon/dnsnames.go b/cmd/compute-domain-daemon/dnsnames.go index dd5daff2b..150bcbb88 100644 --- a/cmd/compute-domain-daemon/dnsnames.go +++ b/cmd/compute-domain-daemon/dnsnames.go @@ -176,7 +176,7 @@ func (m *DNSNameManager) updateHostsFile() error { // Add new DNS name mappings for ip, dnsName := range m.ipToDNSName { - newHostsContent.WriteString(fmt.Sprintf("%s\t%s\n", ip, dnsName)) + _, _ = fmt.Fprintf(&newHostsContent, "%s\t%s\n", ip, dnsName) } // Write the updated hosts file