types/ptr: deprecate ptr.To, use Go 1.26 new
Updates #18682 Change-Id: I62f6aa0de2a15ef8c1435032c6aa74a181c25f8f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
8cfbaa717d
commit
2a64c03c95
@@ -34,7 +34,6 @@ import (
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/types/netlogtype"
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/types/views"
|
||||
"tailscale.com/util/eventbus"
|
||||
"tailscale.com/util/eventbus/eventbustest"
|
||||
@@ -655,9 +654,9 @@ func TestPeerCfg_NAT(t *testing.T) {
|
||||
},
|
||||
}
|
||||
if masqIP.Is4() {
|
||||
p.V4MasqAddr = ptr.To(masqIP)
|
||||
p.V4MasqAddr = new(masqIP)
|
||||
} else {
|
||||
p.V6MasqAddr = ptr.To(masqIP)
|
||||
p.V6MasqAddr = new(masqIP)
|
||||
}
|
||||
p.AllowedIPs = append(p.AllowedIPs, otherAllowedIPs...)
|
||||
return p
|
||||
|
||||
Reference in New Issue
Block a user