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
@@ -38,7 +38,6 @@ import (
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/types/opt"
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/util/httpm"
|
||||
"tailscale.com/util/mak"
|
||||
"tailscale.com/util/must"
|
||||
@@ -1337,9 +1336,9 @@ func (s *Server) MapResponse(req *tailcfg.MapRequest) (res *tailcfg.MapResponse,
|
||||
}
|
||||
if masqIP := nodeMasqs[p.Key]; masqIP.IsValid() {
|
||||
if masqIP.Is6() {
|
||||
p.SelfNodeV6MasqAddrForThisPeer = ptr.To(masqIP)
|
||||
p.SelfNodeV6MasqAddrForThisPeer = new(masqIP)
|
||||
} else {
|
||||
p.SelfNodeV4MasqAddrForThisPeer = ptr.To(masqIP)
|
||||
p.SelfNodeV4MasqAddrForThisPeer = new(masqIP)
|
||||
}
|
||||
}
|
||||
p.IsJailed = jailed[p.Key]
|
||||
|
||||
Reference in New Issue
Block a user