Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix minor typos #324

Merged
merged 6 commits into from Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .golangci.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion events/codebuild.go
Expand Up @@ -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"`

Expand Down
4 changes: 2 additions & 2 deletions lambda/entry.go
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions lambda/invoke_loop.go
Expand Up @@ -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")
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lambdacontext/context.go
Expand Up @@ -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

Expand Down