chore: bump Go version to 1.26.0 (#7856)

This commit is contained in:
Ville Vesilehto
2026-02-16 14:26:18 +02:00
committed by GitHub
parent 0f0a9920b1
commit b1080a2934
20 changed files with 34 additions and 32 deletions

View File

@@ -60,7 +60,7 @@ func reverse6(slice []string) string {
j := len(slice) - i - 1
slice[i], slice[j] = slice[j], slice[i]
}
slice6 := []string{}
slice6 := make([]string, 0, len(slice)/4)
for i := range len(slice) / 4 {
slice6 = append(slice6, strings.Join(slice[i*4:i*4+4], ""))
}

View File

@@ -32,7 +32,7 @@ func (f F) Through(qname string) bool {
// setZones will set zones in f.
func (f *F) setZones(zones []string) {
z := []string{}
z := make([]string, 0, len(zones))
for i := range zones {
z = append(z, plugin.Host(zones[i]).NormalizeExact()...)
}

View File

@@ -30,7 +30,7 @@ func stripZone(host string) string {
// and in case of filename a resolv.conf like file is (assumed) and parsed and
// the nameservers found are returned.
func HostPortOrFile(s ...string) ([]string, error) {
var servers []string //nolint:prealloc // impossible to know the final length upfront
var servers []string
for _, h := range s {
trans, host := Transport(h)
if len(host) == 0 {