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

README.MD SimpleLambdaHandler example with events. #286

Merged
merged 2 commits into from Feb 9, 2023

Conversation

fitomad
Copy link
Contributor

@fitomad fitomad commented Feb 9, 2023

Changed the SQS.Event type to the existing SQSEvent type

Motivation:

Try to run the mentioned code snippet throws a non existing type error.

Because the AWS events are developed in a separated package could takes some times to find the error to a developer trying to use this snippet as base for his/her code.

Also, the Void returning type has been removed from code, following the Apple style guideline related to the use of Void.

Modifications:

At README.MD file, change the snippet to use the right type and Void returning type removed to follow the Apple style guideline.

Result:

The snippet

 // Import the modules
 import AWSLambdaRuntime
 import AWSLambdaEvents

 @main
 struct MyLambda: SimpleLambdaHandler {
     // In this example we are receiving a SQS Event, with no response (Void).
     func handle(_ event: SQSEvent, context: LambdaContext) async throws {
         ...
     }
 }

@swift-server-bot
Copy link

Can one of the admins verify this patch?

12 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@tomerd
Copy link
Contributor

tomerd commented Feb 9, 2023

@swift-server-bot test this please

@tomerd
Copy link
Contributor

tomerd commented Feb 9, 2023

thanks @fitomad

@tomerd tomerd enabled auto-merge (squash) February 9, 2023 08:17
@tomerd tomerd merged commit 81762b0 into swift-server:main Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants