File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cnr
33import (
44 "fmt"
55 "regexp"
6+ "slices"
67 "sort"
78 "strings"
89
@@ -73,12 +74,12 @@ func (n *Client) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Cor
7374 sort .Strings (foundLower )
7475 foundNameservers := strings .Join (foundLower , "," )
7576
76- expected := []string {}
77+ expected := make ( []string , 0 , len ( dc . Nameservers ))
7778 for _ , ns := range dc .Nameservers {
78- name := strings .ToLower (strings .TrimRight (ns .Name , "." ))
79- expected = append (expected , name )
79+ expected = append (expected , strings .ToLower (strings .TrimRight (ns .Name , "." )))
8080 }
81- sort .Strings (expected )
81+ slices .Sort (expected )
82+ expected = slices .Compact (expected )
8283 expectedNameservers := strings .Join (expected , "," )
8384
8485 if foundNameservers != expectedNameservers {
You can’t perform that action at this time.
0 commit comments