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