style: gofmt all packages (#4)

Applies gofmt to the 18 files that were already unformatted at HEAD (pre-existing debt — 122 insertions / 122 deletions, whitespace plus import-block reorderings only; `git diff -w` confirms no semantic changes).

Kept on its own branch so the functional change set (see the review-hardening PR) stays reviewable without formatting noise.

Verified: go build, go vet, go test ./... pass on this branch; a merge simulation with the functional branch produces a clean 3-way merge with all tests green.
Reviewed-on: #4
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #4.
This commit is contained in:
2026-09-17 09:05:57 +00:00
committed by david
parent 876d2aa45f
commit d6d2a24ddc
18 changed files with 126 additions and 126 deletions
+14 -14
View File
@@ -33,11 +33,11 @@ type Node struct {
// pingResponse is the anti-entropy summary returned by /v1/ping.
type pingResponse struct {
NodeID string `json:"node_id"`
Name string `json:"name"`
Vector map[string]int64 `json:"vector"` // node_id → max hcl
Peers []db.PeerInfo `json:"peers"` // swarm membership this node knows
MaxHCL *int64 `json:"max_hcl,omitempty"`
NodeID string `json:"node_id"`
Name string `json:"name"`
Vector map[string]int64 `json:"vector"` // node_id → max hcl
Peers []db.PeerInfo `json:"peers"` // swarm membership this node knows
MaxHCL *int64 `json:"max_hcl,omitempty"`
}
func (n *Node) Handler() http.Handler {
@@ -123,11 +123,11 @@ func (n *Node) handleBatch(w http.ResponseWriter, r *http.Request) {
// DiffSummary is the divergence snapshot served at /v1/diff: everything this
// node observes, plus the status of auto-threaded threads (for tombstones).
type DiffSummary struct {
NodeID string `json:"node_id"`
Name string `json:"name"`
Fingerprints []string `json:"fingerprints"`
ThreadStatus map[string]string `json:"thread_status"`
ObsCount int `json:"obs_count"`
NodeID string `json:"node_id"`
Name string `json:"name"`
Fingerprints []string `json:"fingerprints"`
ThreadStatus map[string]string `json:"thread_status"`
ObsCount int `json:"obs_count"`
}
func (n *Node) handleDiff(w http.ResponseWriter, r *http.Request) {
@@ -163,9 +163,9 @@ func writeJSON(w http.ResponseWriter, v any) {
// Client is the pull/push half used by the exchange loop.
type Client struct {
NodeID string
Addr string
Timeout time.Duration
NodeID string
Addr string
Timeout time.Duration
}
func (c *Client) Ping() (*pingResponse, error) {
@@ -410,4 +410,4 @@ func PeerAddrs() []string {
}
}
return out
}
}