lifadev / archive_aws-lambda-go-shim

Author your AWS Lambda functions in Go, effectively.
https://github.com/eawsy/aws-lambda-go-shim
Apache License 2.0
789 stars 66 forks source link

Update readme instructions #7

Closed neerajvisal closed 7 years ago

neerajvisal commented 7 years ago

Having a main function is necessary to build the go binary as the compiler will look for it.

If you follow the step by step instructions to get the hello world lambda working you get a build error -


main.go:1:1: expected 'package', found 'EOF'
make: *** [_all] Error 1
make: *** [all] Error 2```

By adding an empty main function you can get rid of this error.
fsenart commented 7 years ago

Hi @neerajvisal,

First of all thank you very much for contributing to the project. But I can't accept the PR, because it may be more a bug than an oversight in the README. One of the new things compared to the precedent version eawsy/aws-lambda-go is that eawsy/aws-lambda-go-shim uses Go 1.8 plugins and then does not need to have an empty main.

Can you please open an issue, and provide more information about the code you try to compile and the build instructions you use.

neerajvisal commented 7 years ago

@fsenart, sorry about the late reply.

I don't think it is a bug of any sort. It was a combination of me running go 1.7.1 and your new shim. Sorry about the confusion.

I tried building it using docker container make file the repo provides and without the main function and it worked fine.