serverless-offline
serverless-offline copied to clipboard
feat: Go replace
Description
Add a new option for Golang runner to fix the incompatibility between local running and AWS.
You can use sls offline start --stage local --goReplace bin=cmd
to tell the runner how to find source files.
How to work?
functions:
hello:
handler: bin/hello # <------- it will automatically replace here with cmd/hello/main.go
events:
- httpApi:
path: /hello
method: get
#1644 #1358
I will read up on the Go issues and see if this is the way to go, or is there a better change to make this compliant with AWS.
Are there any updates on this?
@heyanlong I don't think this is a right solution. We should take a closer look at why this doesn't work with the handler
configuration that works on AWS.
Closing because this PR has been open for too long. Sorry it was not merged, please publish a newer PR if you still want this behavior in the codebase.