func Basename(path string) string {
	if path == "" {
		return ""
	}
	path = path[len(filepath.VolumeName(path)):]
	i := len(path) - 1
	for i >= 0 && !os.IsPathSeparator(path[i]) {
		i--
	}
	if i >= 0 {
		path = path[i+1:]
	}
	return path
}
Basename is like filepath.Base but do not strip the trailing slash.
If 'path' is empty, return the empty string.
package main
import (
	"errors"
	"io"
	"os"
	"path/filepath"
	"sort"
	"strconv"
	"sync"
	"time"
	"github.com/yookoala/realpath"
)