Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / kubernetes-controller-tools / version.patch
blobb86c3d69c3a9b2674aaab0f7e7e6cc429d6b17fb
1 diff --git a/pkg/version/version.go b/pkg/version/version.go
2 index 09c8efcf..b9ec798a 100644
3 --- a/pkg/version/version.go
4 +++ b/pkg/version/version.go
5 @@ -20,14 +20,12 @@ import (
6 "runtime/debug"
9 +var version string
11 // Version returns the version of the main module
12 func Version() string {
13 - info, ok := debug.ReadBuildInfo()
14 - if !ok || info == nil || info.Main.Version == "" {
15 - // binary has not been built with module support or doesn't contain a version.
16 - return "(unknown)"
17 - }
18 - return info.Main.Version
19 + _ = debug.ReadBuildInfo
20 + return version
23 // Print prints the main module version on stdout.