Extend `proxy -version` to also show the go runtime version. (#150)
- Extend `proxy -version` to also show the go version the proxy.go was compiled with (makes it easier to check if go security updates need to be applied).
diff --git a/CHANGES.md b/CHANGES.md
index 6d83c4d..8356b69 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -20,6 +20,7 @@
# 1.17.1
- support for zipping and unzipping symbolic links (required to support virtualenvs)
- go 1.15 runtime upgraded to 1.15.13
+- extend `proxy -version` to also show the go version the proxy.go was compiled with (makes it easier to check if go security updates need to be applied)
# 1.17.0
- go 1.15 runtime upgraded to 1.15.7
diff --git a/main/proxy.go b/main/proxy.go
index 7f4b6bc..1b33ad6 100644
--- a/main/proxy.go
+++ b/main/proxy.go
@@ -21,6 +21,7 @@
"fmt"
"log"
"os"
+ "runtime"
"github.com/apache/openwhisk-runtime-go/openwhisk"
)
@@ -49,7 +50,7 @@
// show version number
if *version {
- fmt.Printf("OpenWhisk ActionLoop Proxy v%s\n", openwhisk.Version)
+ fmt.Printf("OpenWhisk ActionLoop Proxy v%s, built with %s\n", openwhisk.Version, runtime.Version())
return
}