From cf91441a1b7eef528c89ed59da12856745ae1259 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 16 Jun 2025 16:27:54 +0200 Subject: [PATCH] pkg/ioutils: remove deprecated atomicwriter functions The atomicwriter utilities were moved to a separate package in commit 786445479256b74d6dc85089b259ec733cbaab80 (v28.0.0), which in its turn was moved to a separate module in 6422ff2804f9e141d9df5a5943650ecb021da0ad (v28.1.0). Signed-off-by: Sebastiaan van Stijn --- pkg/ioutils/fswriters_deprecated.go | 44 ----------------------------- 1 file changed, 44 deletions(-) delete mode 100644 pkg/ioutils/fswriters_deprecated.go diff --git a/pkg/ioutils/fswriters_deprecated.go b/pkg/ioutils/fswriters_deprecated.go deleted file mode 100644 index f34e06911c..0000000000 --- a/pkg/ioutils/fswriters_deprecated.go +++ /dev/null @@ -1,44 +0,0 @@ -package ioutils - -import ( - "io" - "os" - - "github.com/moby/sys/atomicwriter" -) - -// NewAtomicFileWriter returns WriteCloser so that writing to it writes to a -// temporary file and closing it atomically changes the temporary file to -// destination path. Writing and closing concurrently is not allowed. -// NOTE: umask is not considered for the file's permissions. -// -// Deprecated: use [atomicwriter.New] instead. -func NewAtomicFileWriter(filename string, perm os.FileMode) (io.WriteCloser, error) { - return atomicwriter.New(filename, perm) -} - -// AtomicWriteFile atomically writes data to a file named by filename and with the specified permission bits. -// NOTE: umask is not considered for the file's permissions. -// -// Deprecated: use [atomicwriter.WriteFile] instead. -func AtomicWriteFile(filename string, data []byte, perm os.FileMode) error { - return atomicwriter.WriteFile(filename, data, perm) -} - -// AtomicWriteSet is used to atomically write a set -// of files and ensure they are visible at the same time. -// Must be committed to a new directory. -// -// Deprecated: use [atomicwriter.WriteSet] instead. -type AtomicWriteSet = atomicwriter.WriteSet - -// NewAtomicWriteSet creates a new atomic write set to -// atomically create a set of files. The given directory -// is used as the base directory for storing files before -// commit. If no temporary directory is given the system -// default is used. -// -// Deprecated: use [atomicwriter.NewWriteSet] instead. -func NewAtomicWriteSet(tmpDir string) (*atomicwriter.WriteSet, error) { - return atomicwriter.NewWriteSet(tmpDir) -}