style: gofmt all packages

This commit is contained in:
2026-09-17 01:49:12 -07:00
parent 876d2aa45f
commit fb115d5c58
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
}
}
+1 -1
View File
@@ -240,4 +240,4 @@ func TestGossipIdempotent(t *testing.T) {
if before != after {
t.Errorf("second sweep changed entry count: %d -> %d", before, after)
}
}
}
+1 -1
View File
@@ -20,4 +20,4 @@ func Reconcile(kdb *db.KnoxDB) (int, int, error) {
return 0, 0, fmt.Errorf("auto-thread: %w", err)
}
return created, linked, nil
}
}