swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.12k stars 100 forks source link

README.MD SimpleLambdaHandler example with events. #286

Closed fitomad closed 1 year ago

fitomad commented 1 year ago

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 commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

tomerd commented 1 year ago

@swift-server-bot test this please

tomerd commented 1 year ago

thanks @fitomad