func tarName(p string) (string, error) {
	if strings.Contains(p, "/") {
		return "", fmt.Errorf("windows path contains forward slash: %s", p)
	}
	return strings.Replace(p, string(os.PathSeparator), "/", -1), nil
}
tarName returns platform-specific filepath
to canonical posix-style path for tar archival. p is relative
path.
package archive
import (
	"archive/tar"
	"fmt"
	"os"
	"strings"
	"github.com/containerd/containerd/sys"
	"github.com/pkg/errors"
)