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
+12 -3
View File
@@ -29,7 +29,10 @@ func TestHandleClipAcceptsValidPayload(t *testing.T) {
Ts: 1690000000000000000,
Origin: "other-machine",
}
body, _ := json.Marshal(payload)
body, err := json.Marshal(payload)
if err != nil {
t.Fatalf("json.Marshal: %v", err)
}
req := httptest.NewRequest(http.MethodPost, "/clip", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
@@ -59,7 +62,10 @@ func TestHandleClipIgnoresEcho(t *testing.T) {
Ts: 1690000000000000000,
Origin: "other-machine",
}
body, _ := json.Marshal(payload)
body, err := json.Marshal(payload)
if err != nil {
t.Fatalf("json.Marshal: %v", err)
}
req := httptest.NewRequest(http.MethodPost, "/clip", bytes.NewReader(body))
w := httptest.NewRecorder()
@@ -100,7 +106,10 @@ func TestHandleClipRejectsEmptyText(t *testing.T) {
Ts: 1690000000000000000,
Origin: "other-machine",
}
body, _ := json.Marshal(payload)
body, err := json.Marshal(payload)
if err != nil {
t.Fatalf("json.Marshal: %v", err)
}
req := httptest.NewRequest(http.MethodPost, "/clip", bytes.NewReader(body))
w := httptest.NewRecorder()