You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mounter.go
    path of file: ./repos/client/go/kbfs/libfuse
    
    the code of the file until where you have to start completion: // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
//
//go:build !wind
    
func (m *mounter) Unmount() (err error) {
	m.log.Info("Unmounting")
	dir := m.options.MountPoint
	// Try normal unmount
	switch runtime.GOOS {
	case "darwin": // no ios
		_, err = exec.Command("/sbin/umount", dir).Output()
	case "linux":
		fusermountOutput, fusermountErr := exec.Command("fusermount", "-u", dir).CombinedOutput()
		// Only clean up mountdir on a clean unmount.
		if fusermountErr == nil {
			m.log.Info("Successfully unmounted")
			defer m.DeleteMountdirIfEmpty()
		}
		if fusermountErr != nil {
			// Ignore errors where the mount was never mounted in the first place
			if isFusermountMountNotFoundError(fusermountOutput, fusermountErr) {
				m.log.Info("Ignoring mount-not-found fusermount error")
			} else {
				returnErr := fmt.Errorf("fusermount unmount resulted in unknown error: output=%v; err=%s", fusermountOutput, fusermountErr)
				m.log.Warning(returnErr.Error())
				err = returnErr
			}
		}
	default:
		err = fuse.Unmount(dir)
	}
	if err != nil && m.options.ForceMount {
		// Unmount failed, so let's try and force it.
		switch runtime.GOOS {
		case "darwin": // no ios
			_, err = exec.Command(
				"/usr/sbin/diskutil", "unmountDisk", "force", dir).Output()
		case "linux":
			// Lazy unmount; will unmount when KBFS is no longer in use.
			_, err = exec.Command("fusermount", "-u", "-z", dir).Output()
		default:
			err = errors.New("Forced unmount is not supported on this platform yet")
		}
	}
	if execErr, ok := err.(*exec.ExitError); ok && execErr.Stderr != nil {
		err = fmt.Errorf("%s (%s)", execErr, execErr.Stderr)
	}
	return
}