add: .golangci.yml

This commit is contained in:
2026-02-11 04:21:54 +08:00
parent a3989aeedd
commit ae0ab09b48
10 changed files with 247 additions and 66 deletions

View File

@@ -3,9 +3,10 @@ package transfer
import (
"encoding/json"
"log/slog"
"mesh-drop/internal/config"
"os"
"path/filepath"
"mesh-drop/internal/config"
)
func (s *Service) SaveHistory() {
@@ -24,7 +25,7 @@ func (s *Service) SaveHistory() {
}
// 写入临时文件
if err := os.WriteFile(tempPath, historyJson, 0644); err != nil {
if err := os.WriteFile(tempPath, historyJson, 0o600); err != nil {
slog.Error("Failed to write temp history file", "error", err, "component", "transfer")
return
}