From 303c53a560621fdbbadb1aa61b984f479c98d831 Mon Sep 17 00:00:00 2001 From: jonee Date: Sat, 24 Oct 2020 13:16:24 -0500 Subject: [PATCH] Update README.md Proper go static building for OpenWhisk. While the example will compile and run, the moment the codes start importing external libraries, it would fail to work when invoked / run. --- openwhisk-go-simple/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwhisk-go-simple/README.md b/openwhisk-go-simple/README.md index dbeca6383..7768690e5 100644 --- a/openwhisk-go-simple/README.md +++ b/openwhisk-go-simple/README.md @@ -21,7 +21,7 @@ You will also need to set up your OpenWhisk account credentials using environmen ## 2. Compile Go Binary ``` -$ env GOOS=linux GOARCH=amd64 go build handler.go +$ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s -w -extldflags "-static"' handler.go ``` ## 3. Deploy