mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
add runtime.Version() to runc --version
Printing Go version would be helpful to debug runtime-related errors. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/opencontainers/runc/libcontainer/logs"
|
"github.com/opencontainers/runc/libcontainer/logs"
|
||||||
@@ -62,6 +63,7 @@ func main() {
|
|||||||
v = append(v, fmt.Sprintf("commit: %s", gitCommit))
|
v = append(v, fmt.Sprintf("commit: %s", gitCommit))
|
||||||
}
|
}
|
||||||
v = append(v, fmt.Sprintf("spec: %s", specs.Version))
|
v = append(v, fmt.Sprintf("spec: %s", specs.Version))
|
||||||
|
v = append(v, fmt.Sprintf("go: %s", runtime.Version()))
|
||||||
app.Version = strings.Join(v, "\n")
|
app.Version = strings.Join(v, "\n")
|
||||||
|
|
||||||
xdgRuntimeDir := ""
|
xdgRuntimeDir := ""
|
||||||
|
|||||||
Reference in New Issue
Block a user