From 3a608abdfc8976ad538e6fc15e91915b07aeefda Mon Sep 17 00:00:00 2001 From: David Hontecillas Date: Mon, 7 Oct 2024 09:19:52 +0200 Subject: [PATCH] get go version from runtime Signed-off-by: David Hontecillas --- core/version.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/version.go b/core/version.go index 4a8b04251..9c7006198 100644 --- a/core/version.go +++ b/core/version.go @@ -1,11 +1,14 @@ // SPDX-License-Identifier: Apache-2.0 /* - Package core contains some basic constants and variables +Package core contains some basic constants and variables */ package core -import "fmt" +import ( + "fmt" + "runtime" +) // KrakendHeaderName is the name of the custom KrakenD header const KrakendHeaderName = "X-KRAKEND" @@ -14,7 +17,7 @@ const KrakendHeaderName = "X-KRAKEND" var KrakendVersion = "undefined" // GoVersion is the version of the go compiler used at build time -var GoVersion = "undefined" +var GoVersion = runtime.Version() // GlibcVersion is the version of the glibc used by CGO at build time var GlibcVersion = "undefined"