From 7668f53a648ab0967a9595cdf69ce8e69843d0e9 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Sat, 22 Apr 2023 09:49:53 -0400 Subject: [PATCH] Go spell fixes --- lib/configurators/aws/aws_test.go | 4 ++-- lib/events/athena/athena.go | 4 ++-- lib/kube/proxy/pod_rbac_test.go | 2 +- lib/reversetunnel/agentpool.go | 2 +- lib/services/matchers_test.go | 4 ++-- lib/srv/alpnproxy/forward_proxy.go | 2 +- lib/usagereporter/teleport/usagereporter_test.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/configurators/aws/aws_test.go b/lib/configurators/aws/aws_test.go index c0cd754443cf4..529c579ff1e71 100644 --- a/lib/configurators/aws/aws_test.go +++ b/lib/configurators/aws/aws_test.go @@ -1397,7 +1397,7 @@ func TestAWSDocumentConfigurator(t *testing.T) { ForceEC2Permissions: true, }, Policies: &policiesMock{ - upsertArn: "polcies-arn", + upsertArn: "policies-arn", }, } configurator, err := NewAWSConfigurator(config) @@ -1429,7 +1429,7 @@ func TestAWSConfigurator(t *testing.T) { ForceRDSPermissions: true, }, Policies: &policiesMock{ - upsertArn: "polcies-arn", + upsertArn: "policies-arn", }, } diff --git a/lib/events/athena/athena.go b/lib/events/athena/athena.go index 95bf3d2d91903..0de259f024b80 100644 --- a/lib/events/athena/athena.go +++ b/lib/events/athena/athena.go @@ -187,10 +187,10 @@ func (cfg *Config) CheckAndSetDefaults(ctx context.Context) error { } if cfg.LimiterRate < 0 { - return trace.BadParameter("LimiterRate cannot be nagative") + return trace.BadParameter("LimiterRate cannot be negative") } if cfg.LimiterBurst < 0 { - return trace.BadParameter("LimiterBurst cannot be nagative") + return trace.BadParameter("LimiterBurst cannot be negative") } if cfg.LimiterRate > 0 && cfg.LimiterBurst == 0 { diff --git a/lib/kube/proxy/pod_rbac_test.go b/lib/kube/proxy/pod_rbac_test.go index eb1c6f6d7d34c..9bbf4e73d560b 100644 --- a/lib/kube/proxy/pod_rbac_test.go +++ b/lib/kube/proxy/pod_rbac_test.go @@ -267,7 +267,7 @@ func TestListPodRBAC(t *testing.T) { }, }, { - name: "user with pod access request that no longer fullfils the role requirements", + name: "user with pod access request that no longer fullfills the role requirements", args: args{ user: userWithLimitedAccess, namespace: metav1.NamespaceDefault, diff --git a/lib/reversetunnel/agentpool.go b/lib/reversetunnel/agentpool.go index 19df3bb4c6c74..f4c5a8864c86f 100644 --- a/lib/reversetunnel/agentpool.go +++ b/lib/reversetunnel/agentpool.go @@ -765,7 +765,7 @@ func (c *agentPoolRuntimeConfig) update(ctx context.Context, netConfig types.Clu if err == nil { c.tlsRoutingConnUpgradeRequired = client.IsALPNConnUpgradeRequired(addr.Addr, lib.IsInsecureDevMode()) } else { - logrus.WithError(err).Warnf("Faield to resolve addr.") + logrus.WithError(err).Warnf("Failed to resolve addr.") } } } diff --git a/lib/services/matchers_test.go b/lib/services/matchers_test.go index 11749f8376e33..c2b9d4c1d2144 100644 --- a/lib/services/matchers_test.go +++ b/lib/services/matchers_test.go @@ -532,7 +532,7 @@ func TestResourceMatchersToTypes(t *testing.T) { out: []*types.DatabaseResourceMatcher{}, }, { - name: "sinlge element with single label", + name: "single element with single label", in: []ResourceMatcher{ {Labels: types.Labels{"elem1": []string{"elem1"}}}, }, @@ -541,7 +541,7 @@ func TestResourceMatchersToTypes(t *testing.T) { }, }, { - name: "sinlge element with multiple labels", + name: "single element with multiple labels", in: []ResourceMatcher{ {Labels: types.Labels{"elem2": []string{"elem1", "elem2"}}}, }, diff --git a/lib/srv/alpnproxy/forward_proxy.go b/lib/srv/alpnproxy/forward_proxy.go index eccd7b2cf9fe9..684a75298fba2 100644 --- a/lib/srv/alpnproxy/forward_proxy.go +++ b/lib/srv/alpnproxy/forward_proxy.go @@ -300,7 +300,7 @@ func (h *ForwardToSystemProxyHandler) Handle(ctx context.Context, clientConn net // Send original CONNECT request to system proxy. if err = req.WriteProxy(serverConn); err != nil { - log.WithError(err).Errorf("Failed to send CONNTECT request to system proxy %q.", systemProxyURL.Host) + log.WithError(err).Errorf("Failed to send CONNECT request to system proxy %q.", systemProxyURL.Host) writeHeaderToHijackedConnection(clientConn, req, http.StatusBadGateway) return } diff --git a/lib/usagereporter/teleport/usagereporter_test.go b/lib/usagereporter/teleport/usagereporter_test.go index 837fb984b6b43..095f0213d8d50 100644 --- a/lib/usagereporter/teleport/usagereporter_test.go +++ b/lib/usagereporter/teleport/usagereporter_test.go @@ -84,7 +84,7 @@ func TestConvertUsageEvent(t *testing.T) { }}, }, { - name: "error when discover metadata dones't have id", + name: "error when discover metadata doesn't have id", event: &usageeventsv1.UsageEventOneOf{Event: &usageeventsv1.UsageEventOneOf_UiDiscoverResourceSelectionEvent{ UiDiscoverResourceSelectionEvent: &usageeventsv1.UIDiscoverResourceSelectionEvent{ Metadata: &usageeventsv1.DiscoverMetadata{Id: ""},