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
package main

View file

@ -1,3 +1,4 @@
//go:build windows
// +build windows
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
nodeType string
want string
}{
}{
{
name: "adds default port to explicit https without port",
rawHost: "https://example.com",
@ -51,7 +51,7 @@ func TestNormalizeNodeHost(t *testing.T) {
nodeType: "pve",
want: "http://example.com:8006",
},
}
}
for _, tt := range tests {
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)
}
// test comment

View file

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

View file

@ -272,7 +272,7 @@ func TestCircuitBreaker_RetryIntervalBackoff(t *testing.T) {
// All subsequent failures should keep it at maxDelay
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))
}

View file

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

View file

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