diff --git a/pkg/cleanup/unmount_unix.go b/pkg/cleanup/unmount_linux.go similarity index 97% rename from pkg/cleanup/unmount_unix.go rename to pkg/cleanup/unmount_linux.go index e02ab43996ac..01a617aa8a01 100644 --- a/pkg/cleanup/unmount_unix.go +++ b/pkg/cleanup/unmount_linux.go @@ -1,5 +1,3 @@ -//go:build unix - /* Copyright 2024 k0s authors diff --git a/pkg/cleanup/unmount_windows.go b/pkg/cleanup/unmount_other.go similarity index 78% rename from pkg/cleanup/unmount_windows.go rename to pkg/cleanup/unmount_other.go index 8e936605b7f2..217a4c2f64ae 100644 --- a/pkg/cleanup/unmount_windows.go +++ b/pkg/cleanup/unmount_other.go @@ -1,3 +1,5 @@ +//go:build !linux + /* Copyright 2024 k0s authors @@ -16,8 +18,12 @@ limitations under the License. package cleanup -import "fmt" +import ( + "errors" + "fmt" + "runtime" +) -func UnmountLazy(path string) error { - return fmt.Errorf("lazy unmount is not supported on Windows for path: %s", path) +func UnmountLazy(string) error { + return fmt.Errorf("%w on %s", errors.ErrUnsupported, runtime.GOOS) }