// canonicalTarName provides a platform-independent and consistent posix-style
//path for files and directories to be archived regardless of the platform.
canonicalTarName provides a platform-independent and consistent posix-style
path for files and directories to be archived regardless of the platform.
// canonicalTarName provides a platform - independent and consistent posix - style // path for files and directories to be archived regardless of the platform .
func canonicalTarName(name string, isDir bool) (string, error) {
        name, err := canonicalTarNameForPath(name)
        if err != nil {
                return "", err
        }
        if isDir && !strings.HasSuffix(name, "/") {
                name += "/"
        }
        return name, nil
}
func canonicalTarName ( name string , isDir bool ) ( string , error ) { name , err := canonicalTarNameForPath ( name ) if err != nil { return " " , err } if isDir && ! strings . HasSuffix ( name , " " ) { name += " " } return name , nil }
canonicalTarName provides a platform-independent and consistent posix-style
path for files and directories to be archived regardless of the platform.
canonicalTarName provides a platform - independent and consistent posix - style path for files and directories to be archived regardless of the platform .
// suffix with '/' for directories