fix: correction de toutes les erreurs CI — vet, lint, race detector et config
CI / Lint (push) Successful in 18m7s
CI / Test (push) Successful in 9m2s
CI / Build (darwin/amd64) (push) Failing after 4m4s
CI / Build (linux/amd64) (push) Failing after 4m7s
CI / Build (windows/amd64) (push) Failing after 4m5s
CI / Build (darwin/arm64) (push) Failing after 4m4s
CI / Build (linux/arm64) (push) Failing after 4m7s
CI / Build (windows/arm64) (push) Failing after 4m6s
CI / Release (push) Skipped

- clipboard_windows.go: remplacement unsafe.Pointer par unsafe.Add pour go vet 1.26
- clipboard_windows.go: correction errcheck (defer syscall) et ineffassign
- daemon_test.go: mockClipboard thread-safe avec sync.RWMutex (data race)
- daemon_test.go: correction errcheck sur go da.Run()
- server_test.go: vérification des erreurs json.Marshal
- config_test.go: vérification des erreurs MkdirAll/WriteFile
- peers.example.toml: mise à jour au format TOML actuel
This commit is contained in:
2026-08-08 16:28:45 -04:00
parent 5655573fc8
commit d8ee48445b
5 changed files with 126 additions and 57 deletions
+6 -2
View File
@@ -31,7 +31,9 @@ func TestLoadDefaults(t *testing.T) {
func TestLoadFromFile(t *testing.T) {
tmp := t.TempDir()
cfgDir := filepath.Join(tmp, ConfigDir)
os.MkdirAll(cfgDir, 0755)
if err := os.MkdirAll(cfgDir, 0755); err != nil {
t.Fatalf("MkdirAll: %v", err)
}
content := `
[daemon]
@@ -46,7 +48,9 @@ addr = "192.168.1.10:9137"
name = "portable"
addr = "192.168.1.20:9137"
`
os.WriteFile(filepath.Join(cfgDir, ConfigFile), []byte(content), 0644)
if err := os.WriteFile(filepath.Join(cfgDir, ConfigFile), []byte(content), 0644); err != nil {
t.Fatalf("WriteFile: %v", err)
}
t.Setenv("HOME", tmp)
t.Setenv("USERPROFILE", tmp) // Windows compatibility