mirror of
https://github.com/coredns/coredns.git
synced 2026-02-17 12:43:09 -05:00
chore: bump Go version to 1.26.0 (#7856)
This commit is contained in:
@@ -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], ""))
|
||||
}
|
||||
|
||||
@@ -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()...)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user