Closed kmarquardsen closed 7 years ago
If you want to use a single handler.Handler
then you would need to do a setup similar to https://github.com/yunspace/serverless-golang/blob/master/examples/aws-golang-net/serverless.yml#L11
I think I'm talking about the opposite of that?
@kmarquardsen the example above keeps referencing the same handler: todos/handler.Handler
Go function by all those Lambda functions.
I think this is doable and reasonable, you just need to have some logic inside that handler function to determine which action to take depending on the HTTP medhod from the current request.
In my opinion I think having individual Go functions may be simpler/cleaner, because you don't need to have this logic and you just call those dedicated functions on a per method level. But it all depends on how much can you share between the various code paths of the common Go handler function.
Is this possible/would it provide value?