mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
golint changes
This commit is contained in:
parent
79dafaa760
commit
e852cd40f0
@ -23,6 +23,7 @@ import (
|
||||
"golang.org/x/sys/windows/registry"
|
||||
)
|
||||
|
||||
//OSInfo is a convenience class for retrieving Windows OS information
|
||||
type OSInfo struct {
|
||||
BuildNumber, ProductName string
|
||||
MajorVersion, MinorVersion, UBR uint64
|
||||
@ -70,10 +71,12 @@ func GetOSInfo() (*OSInfo, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
//GetPatchVersion returns full OS version with patch
|
||||
func (o *OSInfo) GetPatchVersion() string {
|
||||
return fmt.Sprintf("%d.%d.%s.%d", o.MajorVersion, o.MinorVersion, o.BuildNumber, o.UBR)
|
||||
}
|
||||
|
||||
//GetBuild returns OS version upto build number
|
||||
func (o *OSInfo) GetBuild() string {
|
||||
return fmt.Sprintf("%d.%d.%s", o.MajorVersion, o.MinorVersion, o.BuildNumber)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user