fix lint error

Kim committed Mar 5, 2026 at 18:18 UTC 79765df702aca08bc44dc9e7da667f80748964fe
2 files changed +6 -6
portal/acme/dnsrecord.go
+6 -5
@@ -4,6 +4,7 @@ import (
4 "bytes"
5 "context"
6 "encoding/json"
7 + "errors"
8 "fmt"
9 "io"
10 "net"
@@ -27,8 +28,8 @@ const (
28 // Cloudflare API response types.
29
30 type cfError struct {
30 - Code int `json:"code"`
31 Message string `json:"message"`
32 + Code int `json:"code"`
33 }
34
35 type cfZone struct {
@@ -46,21 +47,21 @@ type cfDNSRecord struct {
47 }
48
49 type cfZonesResult struct {
49 - Success bool `json:"success"`
50 Errors []cfError `json:"errors"`
51 Result []cfZone `json:"result"`
52 + Success bool `json:"success"`
53 }
54
55 type cfRecordsResult struct {
55 - Success bool `json:"success"`
56 Errors []cfError `json:"errors"`
57 Result []cfDNSRecord `json:"result"`
58 + Success bool `json:"success"`
59 }
60
61 type cfRecordResult struct {
61 - Success bool `json:"success"`
62 Errors []cfError `json:"errors"`
63 Result cfDNSRecord `json:"result"`
64 + Success bool `json:"success"`
65 }
66
67 // EnsureDNSRecords creates or updates Cloudflare A records for the base domain
@@ -316,7 +317,7 @@ func cfMutate(ctx context.Context, method, token, rawURL string, body any, out a
317
318 func cfErrs(errs []cfError) error {
319 if len(errs) == 0 {
319 - return fmt.Errorf("cloudflare API request failed")
320 + return errors.New("cloudflare API request failed")
321 }
322 msgs := make([]string, 0, len(errs))
323 for _, e := range errs {
portal/relay.go
-1
@@ -43,7 +43,6 @@ func NewRelayServer(
43 sniRouter: sni.NewRouter(sniPort),
44 }
45
46 -
46 // Auto-register DNS A records in Cloudflare (best-effort, non-fatal).
47 if err := acme.EnsureDNSRecords(ctx, baseHost, cloudflareToken); err != nil {
48 log.Warn().Err(err).Msg("[DNS] failed to auto-register DNS records; continuing without")