April 2018
Intermediate to advanced
250 pages
5h 42m
English
Next, we will write a function using the Go programming language to show you how to decode JSON parameters using the Go built-in library. Of course, we will modify OpenWhisk's Docker skeleton by adding Go compilers and use a multi-stage build to optimize the build process.
Let's start over.
We'll untar the Docker skeleton again, and this time we rename the dockerSkeleton directory docker_go:
$ tar xf blackbox-0.1.0.tar.gz$ mv dockerSkeleton docker_go$ cd docker_go
Inside the docker_go directory, we will write a Go program to decode the JSON params of the action, rearrange them, encode them back to JSON, and write them to the caller:
package mainimport ( "encoding/json" "fmt" "os")func main() { rawParams := []byte(os.Args[1]) ...Read now
Unlock full access