Get returns the overall codebase version. It's for detecting what code a binary was built from.
()
| 26 | // Get returns the overall codebase version. It's for detecting |
| 27 | // what code a binary was built from. |
| 28 | func Get() apimachineryversion.Info { |
| 29 | // These variables typically come from -ldflags settings and in |
| 30 | // their absence fallback to the settings in pkg/version/base.go |
| 31 | return apimachineryversion.Info{ |
| 32 | Major: gitMajor, |
| 33 | Minor: gitMinor, |
| 34 | GitVersion: gitVersion, |
| 35 | GitCommit: gitCommit, |
| 36 | GitTreeState: gitTreeState, |
| 37 | BuildDate: buildDate, |
| 38 | GoVersion: runtime.Version(), |
| 39 | Compiler: runtime.Compiler, |
| 40 | Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), |
| 41 | } |
| 42 | } |
no test coverage detected