various: fix lint warnings

Some lint warnings caught by running 'make lint' locally.

Updates #cleanup

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I1534ed6f2f5e1eb029658906f9d62607dad98ca3
pull/12358/head
Andrew Dunham 6 months ago
parent 34e8820301
commit e88a5dbc92

@ -29,7 +29,6 @@ import (
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
"tailscale.com/client/tailscale" "tailscale.com/client/tailscale"
"tailscale.com/ipn" "tailscale.com/ipn"
kubeutils "tailscale.com/k8s-operator"
tsoperator "tailscale.com/k8s-operator" tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1" tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
"tailscale.com/net/netutil" "tailscale.com/net/netutil"
@ -346,7 +345,7 @@ func (a *tailscaleSTSReconciler) createOrGetSecret(ctx context.Context, logger *
latest := tailcfg.CapabilityVersion(-1) latest := tailcfg.CapabilityVersion(-1)
var latestConfig ipn.ConfigVAlpha var latestConfig ipn.ConfigVAlpha
for key, val := range configs { for key, val := range configs {
fn := kubeutils.TailscaledConfigFileNameForCap(key) fn := tsoperator.TailscaledConfigFileNameForCap(key)
b, err := json.Marshal(val) b, err := json.Marshal(val)
if err != nil { if err != nil {
return "", "", nil, fmt.Errorf("error marshalling tailscaled config: %w", err) return "", "", nil, fmt.Errorf("error marshalling tailscaled config: %w", err)
@ -776,7 +775,7 @@ func tailscaledConfig(stsC *tailscaleSTSConfig, newAuthkey string, oldSecret *co
if len(data) == 0 { if len(data) == 0 {
continue continue
} }
v, err := kubeutils.CapVerFromFileName(k) v, err := tsoperator.CapVerFromFileName(k)
if err != nil { if err != nil {
continue continue
} }

@ -404,10 +404,6 @@ func NewLocalBackend(logf logger.Logf, logID logid.PublicID, sys *tsd.System, lo
} }
envknob.LogCurrent(logf) envknob.LogCurrent(logf)
if dialer == nil {
dialer = &tsdial.Dialer{Logf: logf}
}
osshare.SetFileSharingEnabled(false, logf) osshare.SetFileSharingEnabled(false, logf)
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())

@ -9,7 +9,7 @@ import (
"net/netip" "net/netip"
"time" "time"
"github.com/prometheus-community/pro-bing" probing "github.com/prometheus-community/pro-bing"
) )
// sendOutboundUserPing sends a non-privileged ICMP (or ICMPv6) ping to dstIP with the given timeout. // sendOutboundUserPing sends a non-privileged ICMP (or ICMPv6) ping to dstIP with the given timeout.

Loading…
Cancel
Save