1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-25 14:48:06 +00:00

Merge pull request #3794 from pedromfcarvalho/v1.7-revert-revert-slice

[release/v1.7] Reapply "fix: fix slice init length (#3785)"
This commit is contained in:
Pedro Franco de Carvalho
2025-02-19 17:48:55 -03:00
committed by GitHub

View File

@@ -506,8 +506,8 @@ func DeepEqualIPsAltNames(oldIPs, newIPs []net.IP) bool {
if len(oldIPs) != len(newIPs) {
return false
}
oldIPsStrings := make([]string, len(oldIPs))
newIPsStrings := make([]string, len(newIPs))
oldIPsStrings := make([]string, 0, len(oldIPs))
newIPsStrings := make([]string, 0, len(newIPs))
for i := range oldIPs {
oldIPsStrings = append(oldIPsStrings, oldIPs[i].String())
newIPsStrings = append(newIPsStrings, newIPs[i].String())