mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
lint: enable prealloc (#7493)
This commit is contained in:
@@ -257,8 +257,7 @@ func emitAddressRecord(c chan<- []dns.RR, s msg.Service) string {
|
||||
// calcSRVWeight borrows the logic implemented in plugin.SRV for dynamically
|
||||
// calculating the srv weight and priority
|
||||
func calcSRVWeight(numservices int) uint16 {
|
||||
var services []msg.Service
|
||||
|
||||
services := make([]msg.Service, 0, numservices)
|
||||
for range numservices {
|
||||
services = append(services, msg.Service{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user