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..bcefad5c 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 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 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 { 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 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