diff --git a/internal/shortcut/chat/file_replace.go b/internal/shortcut/chat/file_replace.go index 98560989..6570c725 100644 --- a/internal/shortcut/chat/file_replace.go +++ b/internal/shortcut/chat/file_replace.go @@ -8,6 +8,4 @@ package chat import "os" -func replaceFileAtomically(source, target string) error { - return os.Rename(source, target) -} +var replaceFileAtomically = os.Rename diff --git a/internal/shortcut/chat/file_replace_windows.go b/internal/shortcut/chat/file_replace_windows.go index 3bdcabdd..9c208ccb 100644 --- a/internal/shortcut/chat/file_replace_windows.go +++ b/internal/shortcut/chat/file_replace_windows.go @@ -8,6 +8,4 @@ package chat import "golang.org/x/sys/windows" -func replaceFileAtomically(source, target string) error { - return windows.Rename(source, target) -} +var replaceFileAtomically = windows.Rename