Skip to content

Commit 92b8d93

Browse files
committed
pkg/archive: deprecate CanonicalTarNameForPath
Commit d597584 changed this function to be a wrapper for `filepath.ToSlash`. It was used in the CLI for the classic builder, but is no longer used in our codebase. However, there may still be some consumers that copied the CLI code for the classic builder that didn't synchronise their implementation yet, so let's deprecate this function to give them a warning that they should no longer use this. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent d1273b2 commit 92b8d93

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/archive/archive.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,10 @@ func newTarAppender(idMapping idtools.IdentityMapping, writer io.Writer, chownOp
541541
}
542542

543543
// CanonicalTarNameForPath canonicalizes relativePath to a POSIX-style path using
544-
// forward slashes. It is an alias for filepath.ToSlash, which is a no-op on
544+
// forward slashes. It is an alias for [filepath.ToSlash], which is a no-op on
545545
// Linux and Unix.
546+
//
547+
// Deprecated: use [filepath.ToSlash]. This function will be removed in the next release.
546548
func CanonicalTarNameForPath(relativePath string) string {
547549
return filepath.ToSlash(relativePath)
548550
}

0 commit comments

Comments
 (0)