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: mount.go
    path of file: ./repos/sealer/vendor/github.com/containers/storage/pkg/mount
    
    the code of the file until where you have to start completion: package mount

import (
	"sort"
	"strconv"
	"strings"
)

// mountError holds an error from a mount or unmount operation
type mountError struct {
	op             string
	source, target s
    
func RecursiveUnmount(target string) error {
	mounts, err := GetMounts()
	if err != nil {
		return err
	}

	// Make the deepest mount be first
	sort.Slice(mounts, func(i, j int) bool {
		return len(mounts[i].Mountpoint) > len(mounts[j].Mountpoint)
	})

	for i, m := range mounts {
		if !strings.HasPrefix(m.Mountpoint, target) {
			continue
		}
		if err := Unmount(m.Mountpoint); err != nil && i == len(mounts)-1 {
			return err
			// Ignore errors for submounts and continue trying to unmount others
			// The final unmount should fail if there are any submounts remaining
		}
	}
	return nil
}