gofmt all files

Kim committed Oct 21, 2025 at 18:48 UTC 02fc5005c6688156a8d1d3d52d907a8dbc8da868
2 files changed +16 -16
relaydns/client.go
+9 -9
@@ -76,15 +76,15 @@ func applyDefaults(cfg ClientConfig) ClientConfig {
76 if cfg.HTTPTimeout <= 0 {
77 cfg.HTTPTimeout = defaultHTTPTimeout
78 }
79 - if cfg.RefreshBootstrapsEvery <= 0 {
80 - cfg.RefreshBootstrapsEvery = defaultRefreshBootstraps
81 - }
82 - // Always prefer QUIC and local addresses for better performance and locality.
83 - cfg.PreferQUIC = true
84 - cfg.PreferLocal = true
85 - if cfg.Protocol == "" {
86 - cfg.Protocol = DefaultProtocol
87 - }
79 + if cfg.RefreshBootstrapsEvery <= 0 {
80 + cfg.RefreshBootstrapsEvery = defaultRefreshBootstraps
81 + }
82 + // Always prefer QUIC and local addresses for better performance and locality.
83 + cfg.PreferQUIC = true
84 + cfg.PreferLocal = true
85 + if cfg.Protocol == "" {
86 + cfg.Protocol = DefaultProtocol
87 + }
88 if cfg.Topic == "" {
89 cfg.Topic = DefaultTopic
90 }
relaydns/types.go
+7 -7
@@ -1,21 +1,21 @@
1 package relaydns
2
3 import (
4 - "time"
4 + "time"
5
6 - "github.com/libp2p/go-libp2p/core/peer"
6 + "github.com/libp2p/go-libp2p/core/peer"
7 )
8
9 // Defaults shared by server and client.
10 const (
11 - DefaultProtocol = "/relaydns/http/1.0"
12 - DefaultTopic = "relaydns.backends"
11 + DefaultProtocol = "/relaydns/http/1.0"
12 + DefaultTopic = "relaydns.backends"
13 )
14
15 type Advertise struct {
16 - Peer string `json:"peer"`
17 - Name string `json:"name,omitempty"`
18 - DNS string `json:"dns,omitempty"`
16 + Peer string `json:"peer"`
17 + Name string `json:"name,omitempty"`
18 + DNS string `json:"dns,omitempty"`
19 Addrs []string `json:"addrs"`
20 Ready bool `json:"ready"`
21 Load float64 `json:"load"`