unmount_std.go 273 B

123456789101112131415161718
  1. //go:build !linux && !windows
  2. // +build !linux,!windows
  3. package unmount
  4. import (
  5. "os"
  6. "syscall"
  7. )
  8. func unmount(dir string) error {
  9. err := syscall.Unmount(dir, 0)
  10. if err != nil {
  11. err = &os.PathError{Op: "unmount", Path: dir, Err: err}
  12. return err
  13. }
  14. return nil
  15. }