diff --git a/dns.go b/dns.go index df896090..8ecd993c 100644 --- a/dns.go +++ b/dns.go @@ -51,7 +51,12 @@ func generateMagicDNSRootDomains(ipPrefixes []netaddr.IPPrefix) []dnsname.FQDN { generateDNSRoot = generateIPv6DNSRootDomain default: - panic(fmt.Sprintf("unsupported IP version with address length %d", ipPrefix.IP().BitLen())) + panic( + fmt.Sprintf( + "unsupported IP version with address length %d", + ipPrefix.IP().BitLen(), + ), + ) } fqdns = append(fqdns, generateDNSRoot(ipPrefix)...) @@ -115,7 +120,9 @@ func generateIPv6DNSRootDomain(ipPrefix netaddr.IPPrefix) []dnsname.FQDN { // function is called only once over the lifetime of a server process. prefixConstantParts := []string{} for i := 0; i < maskBits/nibbleLen; i++ { - prefixConstantParts = append([]string{string(nibbleStr[i])}, prefixConstantParts...) + prefixConstantParts = append( + []string{string(nibbleStr[i])}, + prefixConstantParts...) } makeDomain := func(variablePrefix ...string) (dnsname.FQDN, error) { diff --git a/dns_test.go b/dns_test.go index f8f7fb96..80ee83bb 100644 --- a/dns_test.go +++ b/dns_test.go @@ -81,7 +81,11 @@ func (s *Suite) TestMagicDNSRootDomainsIPv6Single(c *check.C) { domains := generateMagicDNSRootDomains(prefixes) c.Assert(len(domains), check.Equals, 1) - c.Assert(domains[0].WithTrailingDot(), check.Equals, "0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa.") + c.Assert( + domains[0].WithTrailingDot(), + check.Equals, + "0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa.", + ) } func (s *Suite) TestMagicDNSRootDomainsIPv6SingleMultiple(c *check.C) {