Skip to content

Commit

Permalink
fix minor typos (#324)
Browse files Browse the repository at this point in the history
* fix minor typos

* fix another typo

* fix another typo

* Update entry.go

Co-authored-by: Bryan Moffatt <[email protected]>
  • Loading branch information
shogo82148 and bmoffatt authored Sep 24, 2020
1 parent c6b2e41 commit f5f1839
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit f5f1839

Please sign in to comment.