pkg/system: move ErrNotSupportedOperatingSystem to where it's used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-09-06 12:26:02 +02:00
parent de391bc48b
commit 150b657bad
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 9 additions and 11 deletions

View file

@ -1,13 +1,6 @@
package system // import "github.com/docker/docker/pkg/system"
import (
"errors"
)
import "errors"
var (
// ErrNotSupportedPlatform means the platform is not supported.
ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")
// ErrNotSupportedOperatingSystem means the operating system is not supported.
ErrNotSupportedOperatingSystem = errors.New("operating system is not supported")
)
// ErrNotSupportedPlatform means the platform is not supported.
var ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")

View file

@ -1,9 +1,14 @@
package system // import "github.com/docker/docker/pkg/system"
package system
import (
"errors"
"runtime"
"strings"
)
// ErrNotSupportedOperatingSystem means the operating system is not supported.
var ErrNotSupportedOperatingSystem = errors.New("operating system is not supported")
// IsOSSupported determines if an operating system is supported by the host.
func IsOSSupported(os string) bool {
return strings.EqualFold(runtime.GOOS, os)