pkg/platform: deprecate OSType in favor or runtime.GOOS
This const looks to only be there for "convenience", or _possibly_ was created with future normalization or special handling in mind. In either case, currently it is just a direct copy (alias) for runtime.GOOS, and defining our own type for this gives the impression that it's more than that. It's only used in a single place, and there's no external consumers, so let's deprecate this const, and use runtime.GOOS instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
cf9a76fe8f
commit
5c78cbd3be
2 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,7 @@ func (daemon *Daemon) SystemInfo() *types.Info {
|
|||
OperatingSystem: operatingSystem(),
|
||||
OSVersion: osVersion(),
|
||||
IndexServerAddress: registry.IndexServer,
|
||||
OSType: platform.OSType,
|
||||
OSType: runtime.GOOS,
|
||||
Architecture: platform.Architecture,
|
||||
RegistryConfig: daemon.registryService.ServiceConfig(),
|
||||
NCPU: sysinfo.NumCPU(),
|
||||
|
|
|
@ -19,6 +19,8 @@ var Architecture string
|
|||
|
||||
// OSType holds the runtime operating system type of the process. It is
|
||||
// an alias for [runtime.GOOS].
|
||||
//
|
||||
// Deprecated: use [runtime.GOOS] instead.
|
||||
const OSType = runtime.GOOS
|
||||
|
||||
func init() {
|
||||
|
|
Loading…
Reference in a new issue