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
@@ -23,7 +23,6 @@ import (
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/types/views"
|
||||
"tailscale.com/util/eventbus"
|
||||
"tailscale.com/wgengine/magicsock"
|
||||
@@ -225,7 +224,7 @@ func (e *extension) profileStateChanged(_ ipn.LoginProfileView, prefs ipn.PrefsV
|
||||
e.stopRelayServerLocked()
|
||||
e.port = nil
|
||||
if ok {
|
||||
e.port = ptr.To(newPort)
|
||||
e.port = new(newPort)
|
||||
}
|
||||
}
|
||||
e.handleRelayServerLifetimeLocked()
|
||||
@@ -264,7 +263,7 @@ func (e *extension) serverStatus() status.ServerStatus {
|
||||
if e.rs == nil {
|
||||
return st
|
||||
}
|
||||
st.UDPPort = ptr.To(*e.port)
|
||||
st.UDPPort = new(*e.port)
|
||||
st.Sessions = e.rs.GetSessions()
|
||||
return st
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user