This commit is contained in:
Julien Bisconti
2026-02-28 01:09:04 +01:00
parent 0089da7ecb
commit 8dc187abc3
5 changed files with 10 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ func SaveHealthCache(path string, hc *HealthCache) error {
if err != nil {
return err
}
return os.WriteFile(path, data, 0644)
return os.WriteFile(path, data, 0o644)
}
// Merge updates the cache with new entries, replacing existing ones by URL.

View File

@@ -14,7 +14,7 @@ func TestLoadExcludeList(t *testing.T) {
- https://example.com
- https://test.org
`
if err := os.WriteFile(path, []byte(content), 0644); err != nil {
if err := os.WriteFile(path, []byte(content), 0o644); err != nil {
t.Fatal(err)
}
@@ -81,7 +81,7 @@ func TestLoadHealthCacheMissing(t *testing.T) {
func TestLoadHealthCacheInvalidYAML(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "health.yaml")
if err := os.WriteFile(path, []byte("entries:\n - url: [not yaml"), 0644); err != nil {
if err := os.WriteFile(path, []byte("entries:\n - url: [not yaml"), 0o644); err != nil {
t.Fatal(err)
}