Selaa lähdekoodia

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 vuosi sitten
vanhempi
commit
150b657bad
2 muutettua tiedostoa jossa 9 lisäystä ja 11 poistoa
  1. 3 10
      pkg/system/errors.go
  2. 6 1
      pkg/system/image_os.go

+ 3 - 10
pkg/system/errors.go

@@ -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")

+ 6 - 1
pkg/system/image_os.go

@@ -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)