refactor(pkg): move atomic file write to dedicated fileutil package
This commit is contained in:
1 parent
4aed3591e7
commit
11996f1a0b
10 files changed
+21
-19
No files matched your search
+2
-2
@@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/sipeed/picoclaw/pkg/utils"
|
||||
"github.com/sipeed/picoclaw/pkg/fileutil"
|
||||
)
|
||||
|
||||
type AuthCredential struct {
|
||||
@@ -71,7 +71,7 @@ func SaveStore(store *AuthStore) error {
|
||||
}
|
||||
|
||||
// Use unified atomic write utility with explicit sync for flash storage reliability.
|
||||
return utils.WriteFileAtomic(path, data, 0o600)
|
||||
return fileutil.WriteFileAtomic(path, data, 0o600)
|
||||
}
|
||||
|
||||
func GetCredential(provider string) (*AuthCredential, error) {
|
||||
|
||||
Reference in new issue
Block a user