From e6febc5839c5a254447c05b0f4da1093f88a0e79 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 19 Jul 2019 03:10:15 +0200 Subject: [PATCH] Fixed a bunch of typos (#7146) --- command/agent/cache/handler.go | 2 +- command/agent/cache/lease_cache_test.go | 2 +- physical/raft/logstore/bolt_store.go | 2 +- physical/raft/raft.go | 2 +- physical/raft/snapshot.go | 2 +- sdk/plugin/grpc_backend_client.go | 2 +- sdk/queue/priority_queue_test.go | 2 +- vault/external_tests/response/allowed_response_headers_test.go | 2 +- vault/identity_store_oidc.go | 2 +- vault/policy_store.go | 2 +- vault/request_forwarding_rpc.go | 2 +- vault/rollback.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/command/agent/cache/handler.go b/command/agent/cache/handler.go index 8ac13294b..b3be9fb17 100644 --- a/command/agent/cache/handler.go +++ b/command/agent/cache/handler.go @@ -173,7 +173,7 @@ func processTokenLookupResponse(ctx context.Context, logger hclog.Logger, inmemS resp.Response.Body = ioutil.NopCloser(bytes.NewReader(bodyBytes)) resp.Response.ContentLength = int64(len(bodyBytes)) - // Serialize and re-read the reponse + // Serialize and re-read the response var respBytes bytes.Buffer err = resp.Response.Write(&respBytes) if err != nil { diff --git a/command/agent/cache/lease_cache_test.go b/command/agent/cache/lease_cache_test.go index 5dde2c35e..7726b5d2f 100644 --- a/command/agent/cache/lease_cache_test.go +++ b/command/agent/cache/lease_cache_test.go @@ -153,7 +153,7 @@ func TestLeaseCache_SendCacheable(t *testing.T) { t.Fatalf("expected getting proxied response: got %v", diff) } - // Make the same request again and ensure that the same reponse is returned + // Make the same request again and ensure that the same response is returned // again. sendReq = &SendRequest{ Token: "autoauthtoken", diff --git a/physical/raft/logstore/bolt_store.go b/physical/raft/logstore/bolt_store.go index 4b6017f59..c6690533c 100644 --- a/physical/raft/logstore/bolt_store.go +++ b/physical/raft/logstore/bolt_store.go @@ -33,7 +33,7 @@ type BoltStore struct { path string } -// Options contains all the configuraiton used to open the BoltDB +// Options contains all the configuration used to open the BoltDB type Options struct { // Path is the file path to the BoltDB to use Path string diff --git a/physical/raft/raft.go b/physical/raft/raft.go index a24120aa3..0f7042b1b 100644 --- a/physical/raft/raft.go +++ b/physical/raft/raft.go @@ -239,7 +239,7 @@ type RaftConfigurationResponse struct { Index uint64 `json:"index"` } -// Peer defines the ID and Adress for a given member of the raft cluster. +// Peer defines the ID and Address for a given member of the raft cluster. type Peer struct { ID string `json:"id"` Address string `json:"address"` diff --git a/physical/raft/snapshot.go b/physical/raft/snapshot.go index 7c993a63e..8538778b5 100644 --- a/physical/raft/snapshot.go +++ b/physical/raft/snapshot.go @@ -237,7 +237,7 @@ func (s *BoltSnapshotSink) Write(b []byte) (int, error) { s.l.Lock() defer s.l.Unlock() - // If someone is writting to this sink then we need to create a file sink to + // If someone is writing to this sink then we need to create a file sink to // capture the data. This currently only happens when a follower is being // sent a snapshot. if s.fileSink == nil { diff --git a/sdk/plugin/grpc_backend_client.go b/sdk/plugin/grpc_backend_client.go index 8e0acc1bb..4bb9a2a4b 100644 --- a/sdk/plugin/grpc_backend_client.go +++ b/sdk/plugin/grpc_backend_client.go @@ -63,7 +63,7 @@ func (b *backendGRPCPluginClient) Initialize(ctx context.Context, _ *logical.Ini } // If the plugin doesn't have Initialize implemented we should not fail - // the initalize call; otherwise this could halt startup of vault. + // the initialize call; otherwise this could halt startup of vault. grpcStatus, ok := status.FromError(err) if ok && grpcStatus.Code() == codes.Unimplemented { return nil diff --git a/sdk/queue/priority_queue_test.go b/sdk/queue/priority_queue_test.go index e570c1b0a..928442b52 100644 --- a/sdk/queue/priority_queue_test.go +++ b/sdk/queue/priority_queue_test.go @@ -183,7 +183,7 @@ func TestPriorityQueue_PopByKey(t *testing.T) { testValidateInternalData(t, pq, len(tc)-len(popKeys)-1, true) } -// testValidateInternalData checks the internal data stucture of the PriorityQueue +// testValidateInternalData checks the internal data structure of the PriorityQueue // and verifies that items are in-sync. Use drain only at the end of a test, // because it will mutate the input queue func testValidateInternalData(t *testing.T, pq *PriorityQueue, expectedSize int, drain bool) { diff --git a/vault/external_tests/response/allowed_response_headers_test.go b/vault/external_tests/response/allowed_response_headers_test.go index a327cd408..2755b620a 100644 --- a/vault/external_tests/response/allowed_response_headers_test.go +++ b/vault/external_tests/response/allowed_response_headers_test.go @@ -79,7 +79,7 @@ func TestIdentityStore_EntityDisabled(t *testing.T) { t.Fatal(err) } - // Here, should suceed but we should not see the header since it's + // Here, should succeed but we should not see the header since it's // not in the allowed list req := client.NewRequest("GET", "/v1/auth/headtest/loginnoerror") resp, err := client.RawRequest(req) diff --git a/vault/identity_store_oidc.go b/vault/identity_store_oidc.go index 0090c997b..56d800dce 100644 --- a/vault/identity_store_oidc.go +++ b/vault/identity_store_oidc.go @@ -1175,7 +1175,7 @@ func (i *IdentityStore) pathOIDCIntrospect(ctx context.Context, req *logical.Req } // namedKey.rotate(overrides) performs a key rotation on a namedKey and returns the -// verification_ttl that was applied. verification_ttl can be overriden with an +// verification_ttl that was applied. verification_ttl can be overridden with an // overrideVerificationTTL value >= 0 func (k *namedKey) rotate(ctx context.Context, s logical.Storage, overrideVerificationTTL time.Duration) error { verificationTTL := k.VerificationTTL diff --git a/vault/policy_store.go b/vault/policy_store.go index 529218bc1..9cdde7438 100644 --- a/vault/policy_store.go +++ b/vault/policy_store.go @@ -524,7 +524,7 @@ func (ps *PolicyStore) switchedGetPolicy(ctx context.Context, name string, polic } } - // Nil-check on the view before proceeding to retrive from storage + // Nil-check on the view before proceeding to retrieve from storage if view == nil { return nil, fmt.Errorf("unable to get the barrier subview for policy type %q", policyType) } diff --git a/vault/request_forwarding_rpc.go b/vault/request_forwarding_rpc.go index 4004fdb18..8db60be3d 100644 --- a/vault/request_forwarding_rpc.go +++ b/vault/request_forwarding_rpc.go @@ -64,7 +64,7 @@ func (s *forwardedRequestRPCServer) ForwardRequest(ctx context.Context, freq *fo } // Performance standby nodes will use this value to do wait for WALs to ship - // in order to do a best-effort read after write gurantee + // in order to do a best-effort read after write guarantee resp.LastRemoteWal = LastWAL(s.core) return resp, nil diff --git a/vault/rollback.go b/vault/rollback.go index 5beb52afe..cd85f0b0b 100644 --- a/vault/rollback.go +++ b/vault/rollback.go @@ -260,7 +260,7 @@ func (m *RollbackManager) Rollback(ctx context.Context, path string) error { rs := m.startOrLookupRollback(ctx, fullPath, false) // Since we have the statelock held, tell any inflight rollback to give up - // trying to aquire it. This will prevent deadlocks in the case where we + // trying to acquire it. This will prevent deadlocks in the case where we // have the write lock. In the case where it was waiting to grab // a read lock it will then simply continue with the rollback // operation under the protection of our write lock.