[solaris] host: add PlatformInformation() which is missing.

This commit is contained in:
shirou 2018-03-22 00:28:00 +09:00
parent 12394ccbca
commit ebe614f6e1
1 changed files with 15 additions and 0 deletions

View File

@ -231,3 +231,18 @@ func KernelVersionWithContext(ctx context.Context) (string, error) {
} }
return "", fmt.Errorf("could not get kernel version") return "", fmt.Errorf("could not get kernel version")
} }
func PlatformInformation() (platform string, family string, version string, err error) {
return PlatformInformationWithContext(context.Background())
}
func PlatformInformationWithContext(ctx context.Context) (platform string, family string, version string, err error) {
/* This is not finished yet at all. Please contribute! */
version, err = KernelVersion()
if err != nil {
return "", "", "", err
}
return "solaris", "solaris", version, nil
}