mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Merge pull request #1251 from filbranden/version_string1
Use just GitVersion for the -version output
This commit is contained in:
commit
9ffe6c05dc
@ -16,10 +16,6 @@ limitations under the License.
|
||||
|
||||
package version
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Info contains versioning information.
|
||||
// TODO: Add []string of api versions supported? It's still unclear
|
||||
// how we'll want to distribute that information.
|
||||
@ -47,9 +43,5 @@ func Get() Info {
|
||||
|
||||
// String returns info as a human-friendly version string.
|
||||
func (info Info) String() string {
|
||||
commit := info.GitCommit
|
||||
if commit == "" {
|
||||
commit = "(unknown)"
|
||||
}
|
||||
return fmt.Sprintf("version %s.%s, build %s", info.Major, info.Minor, commit)
|
||||
return info.GitVersion
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user