lifadev / archive_aws-lambda-go

A fast and clean way to execute Go on AWS Lambda.
https://github.com/eawsy/aws-lambda-go
Apache License 2.0
699 stars 36 forks source link

On Darwin/OSX the stat "format" option is `-f` instead of `-c` #2

Closed raff closed 7 years ago

raff commented 7 years ago

Added a check for the OS and selection of the appropriate option.

fsenart commented 7 years ago

The problem with Darwin is that you MUST use docker. The project uses cgo, then you need to cross compile the binary for the AWS Lambda platform target OS i.e. Linux. Thus, the Makefile build and pack targets are not intended to be used in Darwin, instead use dbuild and dpack to use docker. If you go this way, then dbuild launch docker with a Linux os which in turn will use the build target in the Linux OS, and then there is no need to change the format of stat.

This seems ok for you?

raff commented 7 years ago

Ah! that's true.

But then it would be good if on Darwin you would give a message that say "use the docker build" or something.