From 69315859a474ff30a4fd96323c892935e4a489cb Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 19 Sep 2020 17:21:50 +0900 Subject: [PATCH 1/4] fix minor typos --- .golangci.yml | 6 +++--- events/codebuild.go | 2 +- lambda/entry.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 04547449..99017a26 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,18 +4,18 @@ linters: - gofmt - errcheck - deadcode - - gosimple + - gosimple - govet - ineffassign - staticcheck - - structcheck + - structcheck - typecheck - unused - varcheck run: skip-files: - # These were code-generated, and cannot be changed without breaking RPC compatability. + # These were code-generated, and cannot be changed without breaking RPC compatibility. - lambda/messages/*.go # FIXME diff --git a/events/codebuild.go b/events/codebuild.go index f711c341..bdd1b92c 100644 --- a/events/codebuild.go +++ b/events/codebuild.go @@ -93,7 +93,7 @@ type CodeBuildEventDetail struct { CompletedPhaseEnd CodeBuildTime `json:"completed-phase-end"` } -//CodeBuildEventAdditionalInformation represents additional informations to the code build event +//CodeBuildEventAdditionalInformation represents additional information to the code build event type CodeBuildEventAdditionalInformation struct { Artifact CodeBuildArtifact `json:"artifact"` diff --git a/lambda/entry.go b/lambda/entry.go index 64722e29..46d46695 100644 --- a/lambda/entry.go +++ b/lambda/entry.go @@ -61,9 +61,9 @@ type startFunction struct { } var ( - // This allow users to save a little bit of coldstart time in the download, by the dependecies brought in for RPC support. + // This allow users to save a little bit of coldstart time in the download, by the dependencies brought in for RPC support. // The tradeoff is dropping compatibility with the go1.x runtime, functions must be "Custom Runtime" instead. - // To drop the rpc dependecies, compile with `-tags lambda.norpc` + // To drop the rpc dependencies, compile with `-tags lambda.norpc` rpcStartFunction = &startFunction{ env: "_LAMBDA_SERVER_PORT", f: func(c context.Context, p string, h Handler) error { From 07c8d7437db1d216daf3b0d8ea08725d114d5b10 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 19 Sep 2020 18:43:27 +0900 Subject: [PATCH 2/4] fix another typo --- lambda/invoke_loop.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lambda/invoke_loop.go b/lambda/invoke_loop.go index 25fc6fa4..df4fdda1 100644 --- a/lambda/invoke_loop.go +++ b/lambda/invoke_loop.go @@ -39,18 +39,18 @@ func startRuntimeAPILoop(ctx context.Context, api string, handler Handler) error func handleInvoke(invoke *invoke, function *Function) error { functionRequest, err := convertInvokeRequest(invoke) if err != nil { - return fmt.Errorf("unexpected error occured when parsing the invoke: %v", err) + return fmt.Errorf("unexpected error occurred when parsing the invoke: %v", err) } functionResponse := &messages.InvokeResponse{} if err := function.Invoke(functionRequest, functionResponse); err != nil { - return fmt.Errorf("unexpected error occured when invoking the handler: %v", err) + return fmt.Errorf("unexpected error occurred when invoking the handler: %v", err) } if functionResponse.Error != nil { payload := safeMarshal(functionResponse.Error) if err := invoke.failure(payload, contentTypeJSON); err != nil { - return fmt.Errorf("unexpected error occured when sending the function error to the API: %v", err) + return fmt.Errorf("unexpected error occurred when sending the function error to the API: %v", err) } if functionResponse.Error.ShouldExit { return fmt.Errorf("calling the handler function resulted in a panic, the process should exit") @@ -59,7 +59,7 @@ func handleInvoke(invoke *invoke, function *Function) error { } if err := invoke.success(functionResponse.Payload, contentTypeJSON); err != nil { - return fmt.Errorf("unexpected error occured when sending the function functionResponse to the API: %v", err) + return fmt.Errorf("unexpected error occurred when sending the function functionResponse to the API: %v", err) } return nil From c588558a6cec4185035ea0d9f7da9ab4aa56fc41 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 19 Sep 2020 19:01:01 +0900 Subject: [PATCH 3/4] fix another typo --- lambdacontext/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambdacontext/context.go b/lambdacontext/context.go index 3593c440..caaa766d 100644 --- a/lambdacontext/context.go +++ b/lambdacontext/context.go @@ -2,7 +2,7 @@ // // Helpers for accessing context information from an Invoke request. Context information // is stored in a https://golang.org/pkg/context/#Context. The functions FromContext and NewContext -// are used to retrieving and inserting an isntance of LambdaContext. +// are used to retrieving and inserting an instance of LambdaContext. package lambdacontext From 8163398d2d88a23e79215e79f02d996a35e138dd Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Tue, 22 Sep 2020 11:09:05 -0700 Subject: [PATCH 4/4] Update entry.go --- lambda/entry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda/entry.go b/lambda/entry.go index 46d46695..bcefad5c 100644 --- a/lambda/entry.go +++ b/lambda/entry.go @@ -61,7 +61,7 @@ type startFunction struct { } var ( - // This allow users to save a little bit of coldstart time in the download, by the dependencies brought in for RPC support. + // This allows users to save a little bit of coldstart time in the download, by the dependencies brought in for RPC support. // The tradeoff is dropping compatibility with the go1.x runtime, functions must be "Custom Runtime" instead. // To drop the rpc dependencies, compile with `-tags lambda.norpc` rpcStartFunction = &startFunction{