style: fix gofmt formatting inconsistencies

Run gofmt -w to fix tab/space inconsistencies across 33 files.
This commit is contained in:
rcourtman 2025-11-26 23:44:36 +00:00
parent b40a33fd2b
commit 2fe7bb6141
33 changed files with 584 additions and 584 deletions

View file

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package main package main

View file

@ -1,3 +1,4 @@
//go:build windows
// +build windows // +build windows
package main package main

View file

@ -37,4 +37,3 @@ func startMetricsServer(ctx context.Context, addr string) {
} }
}() }()
} }

View file

@ -8,7 +8,7 @@ func TestNormalizeNodeHost(t *testing.T) {
rawHost string rawHost string
nodeType string nodeType string
want string want string
}{ }{
{ {
name: "adds default port to explicit https without port", name: "adds default port to explicit https without port",
rawHost: "https://example.com", rawHost: "https://example.com",
@ -51,7 +51,7 @@ func TestNormalizeNodeHost(t *testing.T) {
nodeType: "pve", nodeType: "pve",
want: "http://example.com:8006", want: "http://example.com:8006",
}, },
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {

View file

@ -159,4 +159,5 @@ func (h *DockerMetadataHandler) HandleDeleteMetadata(w http.ResponseWriter, r *h
w.WriteHeader(http.StatusNoContent) w.WriteHeader(http.StatusNoContent)
} }
// test comment // test comment

View file

@ -24,7 +24,7 @@ func TestHandleLookupByIDSuccess(t *testing.T) {
handler := newHostAgentHandlerForTests(t, models.Host{ handler := newHostAgentHandlerForTests(t, models.Host{
ID: hostID, ID: hostID,
Hostname: "host.local", Hostname: "host.local",
DisplayName:"Host Local", DisplayName: "Host Local",
Status: "online", Status: "online",
TokenID: tokenID, TokenID: tokenID,
LastSeen: lastSeen, LastSeen: lastSeen,

View file

@ -272,7 +272,7 @@ func TestCircuitBreaker_RetryIntervalBackoff(t *testing.T) {
// All subsequent failures should keep it at maxDelay // All subsequent failures should keep it at maxDelay
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
cb.allow(now.Add(time.Duration(42+i*2)*time.Minute)) cb.allow(now.Add(time.Duration(42+i*2) * time.Minute))
cb.recordFailure(now.Add(time.Duration(42+i*2) * time.Minute)) cb.recordFailure(now.Add(time.Duration(42+i*2) * time.Minute))
} }

View file

@ -9,9 +9,9 @@ import (
"sync" "sync"
"time" "time"
_ "github.com/mattn/go-sqlite3"
"github.com/rcourtman/pulse-go-rewrite/internal/alerts" "github.com/rcourtman/pulse-go-rewrite/internal/alerts"
"github.com/rcourtman/pulse-go-rewrite/internal/utils" "github.com/rcourtman/pulse-go-rewrite/internal/utils"
_ "github.com/mattn/go-sqlite3"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )

View file

@ -246,8 +246,6 @@ func TestMemoryStatusUnmarshalFlexibleValues(t *testing.T) {
} }
} }
// TestMemoryStatusEffectiveAvailable_RegressionIssue435 tests the specific scenarios // TestMemoryStatusEffectiveAvailable_RegressionIssue435 tests the specific scenarios
// reported in GitHub issue #435 where memory calculations incorrectly included cache/buffers // reported in GitHub issue #435 where memory calculations incorrectly included cache/buffers
func TestMemoryStatusEffectiveAvailable_RegressionIssue435(t *testing.T) { func TestMemoryStatusEffectiveAvailable_RegressionIssue435(t *testing.T) {