fix: fix slice init length (#6901)

Signed-off-by: rusttech <gopher@before.tech>
This commit is contained in:
rusttech
2025-12-10 10:17:07 +08:00
committed by GitHub
parent cad961f75f
commit 1fd4ba2e5f

View File

@@ -43,7 +43,7 @@ type Azure struct {
// New validates the input DNS zones and initializes the Azure struct.
func New(ctx context.Context, publicClient publicdns.RecordSetsClient, privateClient privatedns.RecordSetsClient, keys map[string][]string, accessMap map[string]string) (*Azure, error) {
zones := make(map[string][]*zone, len(keys))
names := make([]string, len(keys))
names := make([]string, 0, len(keys))
var private bool
for resourceGroup, znames := range keys {