mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-24 09:39:39 +00:00
util/cmpx: delete now that we're using Go 1.22
Updates #11058 Change-Id: I09dea8e86f03ec148b715efca339eab8b1f0f644 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
5ea071186e
commit
2bd3c1474b
@@ -6,6 +6,7 @@ package netcheck
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"cmp"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
@@ -41,7 +42,6 @@ import (
|
||||
"tailscale.com/types/opt"
|
||||
"tailscale.com/types/views"
|
||||
"tailscale.com/util/clientmetric"
|
||||
"tailscale.com/util/cmpx"
|
||||
"tailscale.com/util/mak"
|
||||
)
|
||||
|
||||
@@ -447,7 +447,7 @@ func makeProbePlan(dm *tailcfg.DERPMap, ifState *interfaces.State, last *Report)
|
||||
do6 = false
|
||||
}
|
||||
n := reg.Nodes[try%len(reg.Nodes)]
|
||||
prevLatency := cmpx.Or(
|
||||
prevLatency := cmp.Or(
|
||||
last.RegionLatency[reg.RegionID]*120/100,
|
||||
defaultActiveRetransmitTime)
|
||||
delay := time.Duration(try) * prevLatency
|
||||
@@ -1602,7 +1602,7 @@ func (rs *reportState) runProbe(ctx context.Context, dm *tailcfg.DERPMap, probe
|
||||
// proto is 4 or 6
|
||||
// If it returns nil, the node is skipped.
|
||||
func (c *Client) nodeAddr(ctx context.Context, n *tailcfg.DERPNode, proto probeProto) (ap netip.AddrPort) {
|
||||
port := cmpx.Or(n.STUNPort, 3478)
|
||||
port := cmp.Or(n.STUNPort, 3478)
|
||||
if port < 0 || port > 1<<16-1 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user