From 33ceab6000d5f18eddbc1c0c97544233f5dd42d6 Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 4 Aug 2026 18:36:39 +0800 Subject: [PATCH] test(chat): keep platform replace alias coverage-neutral --- internal/shortcut/chat/file_replace.go | 4 +--- internal/shortcut/chat/file_replace_windows.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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