lint: add missing prealloc to backend lookup test (#7510)

This commit is contained in:
Ville Vesilehto
2025-09-02 10:41:06 +03:00
committed by GitHub
parent ca9894bea5
commit ecdff70354

View File

@@ -213,8 +213,9 @@ func TestCNAMEHostIsNameAndIpIgnored(t *testing.T) {
func TestCNAMEChainLimitAndLoop(t *testing.T) { func TestCNAMEChainLimitAndLoop(t *testing.T) {
// Construct internal CNAME chain longer than maxCnameChainLength and ensure truncation of chain // Construct internal CNAME chain longer than maxCnameChainLength and ensure truncation of chain
var names []string chainLength := maxCnameChainLength + 2
for i := range maxCnameChainLength + 2 { names := make([]string, 0, chainLength)
for i := range chainLength {
names = append(names, fmt.Sprintf("c%d.example.org.", i)) names = append(names, fmt.Sprintf("c%d.example.org.", i))
} }
chain := map[string]string{} chain := map[string]string{}