diff --git a/client/web/src/components/exit-node-selector.tsx b/client/web/src/components/exit-node-selector.tsx index a564ebbfc..75b2551df 100644 --- a/client/web/src/components/exit-node-selector.tsx +++ b/client/web/src/components/exit-node-selector.tsx @@ -61,7 +61,7 @@ export default function ExitNodeSelector({ none, // not using exit nodes advertising, // advertising as exit node using, // using another exit node - offline, // selected exit node node is offline + offline, // selected exit node is offline ] = useMemo( () => [ selected.ID === noExitNode.ID, diff --git a/cmd/k8s-operator/sts.go b/cmd/k8s-operator/sts.go index daad35aad..f1e10240b 100644 --- a/cmd/k8s-operator/sts.go +++ b/cmd/k8s-operator/sts.go @@ -993,7 +993,7 @@ func enableEndpoints(ss *appsv1.StatefulSet, metrics, debug bool) { if isMainContainer(&c) { if debug { ss.Spec.Template.Spec.Containers[i].Env = append(ss.Spec.Template.Spec.Containers[i].Env, - // Serve tailscaled's debug metrics on on + // Serve tailscaled's debug metrics on // :9001/debug/metrics. If we didn't specify Pod IP // here, the proxy would, in some cases, also listen to its // Tailscale IP- we don't want folks to start relying on this diff --git a/cmd/k8s-operator/svc.go b/cmd/k8s-operator/svc.go index 198a0c943..eb39d0029 100644 --- a/cmd/k8s-operator/svc.go +++ b/cmd/k8s-operator/svc.go @@ -475,7 +475,7 @@ func retrieveClusterDomain(namespace string, logger *zap.SugaredLogger) string { } // clusterDomainFromResolverConf attempts to retrieve cluster domain from the provided resolver config. -// It expects the first three search domains in the resolver config to be be ['.svc., svc., , ...] +// It expects the first three search domains in the resolver config to be ['.svc., svc., , ...] // If the first three domains match the expected structure, it returns the third. // If the domains don't match the expected structure or an error is encountered, it defaults to 'cluster.local' domain. func clusterDomainFromResolverConf(conf *resolvconffile.Config, namespace string, logger *zap.SugaredLogger) string { diff --git a/cmd/tailscale/cli/cli.go b/cmd/tailscale/cli/cli.go index 73c49a2ae..d4729f932 100644 --- a/cmd/tailscale/cli/cli.go +++ b/cmd/tailscale/cli/cli.go @@ -489,7 +489,7 @@ func usageFuncOpt(c *ffcli.Command, withDefaults bool) string { showDefault := f.DefValue != "" && withDefaults // Issue 6766: don't show the default Windows socket path. It's long - // and distracting. And people on on Windows aren't likely to ever + // and distracting. And people on Windows aren't likely to ever // change it anyway. if runtime.GOOS == "windows" && f.Name == "socket" && strings.HasPrefix(f.DefValue, `\\.\pipe\ProtectedPrefix\`) { showDefault = false diff --git a/derp/derphttp/derphttp_client.go b/derp/derphttp/derphttp_client.go index ecaa99cf5..2b048b512 100644 --- a/derp/derphttp/derphttp_client.go +++ b/derp/derphttp/derphttp_client.go @@ -179,7 +179,7 @@ func NewClient(privateKey key.NodePrivate, serverURL string, logf logger.Logf, n // isStarted reports whether this client has been used yet. // -// If if reports false, it may still have its exported fields configured. +// If it reports false, it may still have its exported fields configured. func (c *Client) isStarted() bool { c.mu.Lock() defer c.mu.Unlock() diff --git a/net/dns/manager.go b/net/dns/manager.go index 038675584..b34c5b632 100644 --- a/net/dns/manager.go +++ b/net/dns/manager.go @@ -522,7 +522,7 @@ func (m *Manager) Query(ctx context.Context, bs []byte, family string, from neti maxReqSizeTCP = 4096 ) -// TrampleDNS is an an event indicating we detected that DNS config was +// TrampleDNS is an event indicating we detected that DNS config was // overwritten by another process. type TrampleDNS struct { LastTrample time.Time diff --git a/net/stun/stun.go b/net/stun/stun.go index 7d75e79b8..24c11e147 100644 --- a/net/stun/stun.go +++ b/net/stun/stun.go @@ -211,8 +211,8 @@ func ParseResponse(b []byte) (tID TxID, addr netip.AddrPort, err error) { var fallbackAddr netip.AddrPort // Read through the attributes. - // The the addr+port reported by XOR-MAPPED-ADDRESS - // as the canonical value. If the attribute is not + // The addr+port reported by XOR-MAPPED-ADDRESS + // is the canonical value. If the attribute is not // present but the STUN server responds with // MAPPED-ADDRESS we fall back to it. if err := foreachAttr(b, func(attrType uint16, attr []byte) error { diff --git a/tailcfg/proto_port_range.go b/tailcfg/proto_port_range.go index 63012e93b..611f76001 100644 --- a/tailcfg/proto_port_range.go +++ b/tailcfg/proto_port_range.go @@ -119,7 +119,7 @@ func parseProtoPortRange(ipProtoPort string) (*ProtoPortRange, error) { } // ParseHostPortRange parses hostport as HOST:PORTS where HOST is -// returned unchanged and PORTS is is either "*" or PORTLOW-PORTHIGH ranges. +// returned unchanged and PORTS is either "*" or PORTLOW-PORTHIGH ranges. func ParseHostPortRange(hostport string) (host string, ports PortRange, err error) { hostport = strings.ToLower(hostport) colon := strings.LastIndexByte(hostport, ':') diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index bc9efd744..01cce2fda 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -1086,7 +1086,7 @@ type NetInfo struct { // PreferredDERP is this node's preferred (home) DERP region ID. // This is where the node expects to be contacted to begin a - // peer-to-peer connection. The node might be be temporarily + // peer-to-peer connection. The node might be temporarily // connected to multiple DERP servers (to speak to other nodes // that are located elsewhere) but PreferredDERP is the region ID // that the node subscribes to traffic at. @@ -2117,7 +2117,7 @@ type MapResponse struct { PacketFilters map[string][]FilterRule `json:",omitempty"` // UserProfiles are the user profiles of nodes in the network. - // As as of 1.1.541 (mapver 5), this contains new or updated + // As of 1.1.541 (mapver 5), this contains new or updated // user profiles only. UserProfiles []UserProfile `json:",omitempty"` diff --git a/tailcfg/tailcfg_view.go b/tailcfg/tailcfg_view.go index 846663388..3418c2599 100644 --- a/tailcfg/tailcfg_view.go +++ b/tailcfg/tailcfg_view.go @@ -777,7 +777,7 @@ func (v NetInfoView) PCP() opt.Bool { return v.ж.PCP } // PreferredDERP is this node's preferred (home) DERP region ID. // This is where the node expects to be contacted to begin a -// peer-to-peer connection. The node might be be temporarily +// peer-to-peer connection. The node might be temporarily // connected to multiple DERP servers (to speak to other nodes // that are located elsewhere) but PreferredDERP is the region ID // that the node subscribes to traffic at. diff --git a/tool/go.exe.README.txt b/tool/go.exe.README.txt index 3f4988599..cc75613f2 100644 --- a/tool/go.exe.README.txt +++ b/tool/go.exe.README.txt @@ -6,9 +6,9 @@ In summary, our previous attempts to provide a version of ./tool/go (a shell script) on Windows with PowerShell and cmd.exe both were lacking. -So now we we're regrettably checking in a binary to the tree. Its +So now we're regrettably checking in a binary to the tree. Its source code is in ./tool/goexe. It's written in Rust without std so -it's very small (smaller than plenty of of our source code files!) and +it's very small (smaller than plenty of our source code files!) and it's 32-bit x86 so it runs on 32-bit x86, 64-bit x86, and arm64 Windows where it's emulated. diff --git a/types/key/machine.go b/types/key/machine.go index 9ad73bec1..d20f62643 100644 --- a/types/key/machine.go +++ b/types/key/machine.go @@ -167,7 +167,7 @@ func (k MachinePrivate) OpenFrom(p MachinePublic, ciphertext []byte) (cleartext return box.Open(nil, ciphertext[len(nonce):], &nonce, &p.k, &k.k) } -// MachinePublic is the public portion of a a MachinePrivate. +// MachinePublic is the public portion of a MachinePrivate. type MachinePublic struct { k [32]byte } diff --git a/types/key/nl.go b/types/key/nl.go index 32bc94364..0c1b48f49 100644 --- a/types/key/nl.go +++ b/types/key/nl.go @@ -111,7 +111,7 @@ func (k NLPrivate) SignNKS(sigHash tkatype.NKSSigHash) ([]byte, error) { return ed25519.Sign(ed25519.PrivateKey(k.k[:]), sigHash[:]), nil } -// NLPublic is the public portion of a a NLPrivate. +// NLPublic is the public portion of a NLPrivate. type NLPublic struct { k [ed25519.PublicKeySize]byte } diff --git a/util/syspolicy/source/policy_reader.go b/util/syspolicy/source/policy_reader.go index 177985322..f97d200a1 100644 --- a/util/syspolicy/source/policy_reader.go +++ b/util/syspolicy/source/policy_reader.go @@ -91,7 +91,7 @@ func newReader(store Store, origin *setting.Origin) (*Reader, error) { } // GetSettings returns the current [*setting.Snapshot], -// re-reading it from from the underlying [Store] only if the policy +// re-reading it from the underlying [Store] only if the policy // has changed since it was read last. It never fails and returns // the previous version of the policy settings if a read attempt fails. func (r *Reader) GetSettings() *setting.Snapshot { diff --git a/util/winutil/startupinfo_windows.go b/util/winutil/startupinfo_windows.go index 5ded67c7c..e96209764 100644 --- a/util/winutil/startupinfo_windows.go +++ b/util/winutil/startupinfo_windows.go @@ -156,7 +156,7 @@ func canBeInherited(h windows.Handle) bool { // SetStdHandles sets the StdInput, StdOutput, and StdErr handles and configures // their inheritability as needed. When the handles are valid, non-console -// kernel objects, sib takes ownership of of them. All three handles may be set +// kernel objects, sib takes ownership of them. All three handles may be set // to zero to indicate that the parent's std handles should not be implicitly // inherited. // diff --git a/version/mkversion/mkversion.go b/version/mkversion/mkversion.go index 45576e4c1..23fee416f 100644 --- a/version/mkversion/mkversion.go +++ b/version/mkversion/mkversion.go @@ -289,7 +289,7 @@ func mkOutput(v verInfo) (VersionInfo, error) { // We started to need to do this in 2023, and the last Apple-generated // incrementing build number was 273. To avoid using up the space, we // use as the major version (thus 273.*, 274.* in 2024, etc.), - // so that we we're still in the same range. This way if Apple goes back to + // so that we're still in the same range. This way if Apple goes back to // auto-incrementing the number for us, we can go back to it with // reasonable-looking numbers. // In May 2024, a build with version number 275 was uploaded to the App Store diff --git a/wgengine/filter/match.go b/wgengine/filter/match.go index eee6ddf25..6c157d124 100644 --- a/wgengine/filter/match.go +++ b/wgengine/filter/match.go @@ -56,7 +56,7 @@ func srcMatches(m *filtertype.Match, srcAddr netip.Addr, hasCap CapTestFunc) boo // CapTestFunc is the function signature of a function that tests whether srcIP // has a given capability. // -// It it used in the fast path of evaluating filter rules so should be fast. +// It is used in the fast path of evaluating filter rules so should be fast. type CapTestFunc = func(srcIP netip.Addr, cap tailcfg.NodeCapability) bool func (ms matches) matchIPsOnly(q *packet.Parsed, hasCap CapTestFunc) bool { diff --git a/wgengine/filter/tailcfg.go b/wgengine/filter/tailcfg.go index e7e71526a..3360b169d 100644 --- a/wgengine/filter/tailcfg.go +++ b/wgengine/filter/tailcfg.go @@ -131,7 +131,7 @@ func MatchesFromFilterRules(pf []tailcfg.FilterRule) ([]Match, error) { // // TODO(bradfitz): make this return an IPSet and plumb that all // around, and ultimately use a new version of IPSet.ContainsFunc like -// Contains16Func that works in [16]byte address, so we we can match +// Contains16Func that works in [16]byte address, so we can match // at runtime without allocating? func parseIPSet(arg string) (prefixes []netip.Prefix, peerCap tailcfg.NodeCapability, err error) { if arg == "*" { diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index cf2639eb0..8e4c6bba7 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2401,7 +2401,7 @@ func (c *Conn) handleDiscoMessage(msg []byte, src epAddr, shouldBeRelayHandshake if isCached { metricCachedPeerContactDERP.Add(1) } - // If we did not already have an an endpoint for this peer, even a stale + // If we did not already have an endpoint for this peer, even a stale // one, record how long it has been since the endpoint was initialized. if !lastBest.ap.IsValid() { c.logf("magicsock: new contact: peer=%s usec=%d cached=%v via=derp", diff --git a/wgengine/magicsock/magicsock_test.go b/wgengine/magicsock/magicsock_test.go index 30d6c2910..84b4e999e 100644 --- a/wgengine/magicsock/magicsock_test.go +++ b/wgengine/magicsock/magicsock_test.go @@ -579,7 +579,7 @@ func TestPickDERPFallback(t *testing.T) { } } - // Test that that the pointer value of c is blended in and + // Test that the pointer value of c is blended in and // distribution over nodes works. got := map[int]int{} for range 50 { @@ -1520,7 +1520,7 @@ func TestDiscoStringLogRace(t *testing.T) { wg.Wait() } -// Test32bitAlignment verifies that that the 64-bit atomic mono.Time fields are +// Test32bitAlignment verifies that the 64-bit atomic mono.Time fields are // 64-bit aligned, so that StoreAtomic and LoadAtomic won't panic on 32-bit // platforms. //