ScuttleBot

fix: gofmt — format config and topology files

lmata 2026-04-03 00:35 trunk
Commit 8332dd8ed62c9fc59a17fb02459e50dbcd8eaecddcf8cad716819b64dd6322d8
--- internal/config/config.go
+++ internal/config/config.go
@@ -40,12 +40,12 @@
4040
4141
// LoggingConfig configures message logging.
4242
type LoggingConfig struct {
4343
Enabled bool `yaml:"enabled" json:"enabled"`
4444
Dir string `yaml:"dir" json:"dir"`
45
- Format string `yaml:"format" json:"format"` // "jsonl" | "csv" | "text"
46
- Rotation string `yaml:"rotation" json:"rotation"` // "none" | "daily" | "weekly" | "size"
45
+ Format string `yaml:"format" json:"format"` // "jsonl" | "csv" | "text"
46
+ Rotation string `yaml:"rotation" json:"rotation"` // "none" | "daily" | "weekly" | "size"
4747
MaxSizeMB int `yaml:"max_size_mb" json:"max_size_mb"`
4848
PerChannel bool `yaml:"per_channel" json:"per_channel"`
4949
MaxAgeDays int `yaml:"max_age_days" json:"max_age_days"`
5050
}
5151
5252
--- internal/config/config.go
+++ internal/config/config.go
@@ -40,12 +40,12 @@
40
41 // LoggingConfig configures message logging.
42 type LoggingConfig struct {
43 Enabled bool `yaml:"enabled" json:"enabled"`
44 Dir string `yaml:"dir" json:"dir"`
45 Format string `yaml:"format" json:"format"` // "jsonl" | "csv" | "text"
46 Rotation string `yaml:"rotation" json:"rotation"` // "none" | "daily" | "weekly" | "size"
47 MaxSizeMB int `yaml:"max_size_mb" json:"max_size_mb"`
48 PerChannel bool `yaml:"per_channel" json:"per_channel"`
49 MaxAgeDays int `yaml:"max_age_days" json:"max_age_days"`
50 }
51
52
--- internal/config/config.go
+++ internal/config/config.go
@@ -40,12 +40,12 @@
40
41 // LoggingConfig configures message logging.
42 type LoggingConfig struct {
43 Enabled bool `yaml:"enabled" json:"enabled"`
44 Dir string `yaml:"dir" json:"dir"`
45 Format string `yaml:"format" json:"format"` // "jsonl" | "csv" | "text"
46 Rotation string `yaml:"rotation" json:"rotation"` // "none" | "daily" | "weekly" | "size"
47 MaxSizeMB int `yaml:"max_size_mb" json:"max_size_mb"`
48 PerChannel bool `yaml:"per_channel" json:"per_channel"`
49 MaxAgeDays int `yaml:"max_age_days" json:"max_age_days"`
50 }
51
52
--- internal/config/config_test.go
+++ internal/config/config_test.go
@@ -173,13 +173,13 @@
173173
}
174174
}
175175
176176
func TestDurationJSONUnmarshalErrors(t *testing.T) {
177177
cases := []struct{ input string }{
178
- {`123`}, // not a quoted string
179
- {`"notadur"`}, // not parseable
180
- {`""`}, // empty string
178
+ {`123`}, // not a quoted string
179
+ {`"notadur"`}, // not parseable
180
+ {`""`}, // empty string
181181
}
182182
for _, tc := range cases {
183183
var d Duration
184184
if err := json.Unmarshal([]byte(tc.input), &d); err == nil {
185185
t.Errorf("Unmarshal(%s): expected error, got nil", tc.input)
186186
--- internal/config/config_test.go
+++ internal/config/config_test.go
@@ -173,13 +173,13 @@
173 }
174 }
175
176 func TestDurationJSONUnmarshalErrors(t *testing.T) {
177 cases := []struct{ input string }{
178 {`123`}, // not a quoted string
179 {`"notadur"`}, // not parseable
180 {`""`}, // empty string
181 }
182 for _, tc := range cases {
183 var d Duration
184 if err := json.Unmarshal([]byte(tc.input), &d); err == nil {
185 t.Errorf("Unmarshal(%s): expected error, got nil", tc.input)
186
--- internal/config/config_test.go
+++ internal/config/config_test.go
@@ -173,13 +173,13 @@
173 }
174 }
175
176 func TestDurationJSONUnmarshalErrors(t *testing.T) {
177 cases := []struct{ input string }{
178 {`123`}, // not a quoted string
179 {`"notadur"`}, // not parseable
180 {`""`}, // empty string
181 }
182 for _, tc := range cases {
183 var d Duration
184 if err := json.Unmarshal([]byte(tc.input), &d); err == nil {
185 t.Errorf("Unmarshal(%s): expected error, got nil", tc.input)
186
--- internal/topology/topology.go
+++ internal/topology/topology.go
@@ -36,11 +36,11 @@
3636
Autojoin []string
3737
}
3838
3939
// channelRecord tracks a provisioned channel for TTL-based reaping.
4040
type channelRecord struct {
41
- name string
41
+ name string
4242
provisionedAt time.Time
4343
}
4444
4545
// Manager provisions and maintains IRC channel topology.
4646
type Manager struct {
4747
--- internal/topology/topology.go
+++ internal/topology/topology.go
@@ -36,11 +36,11 @@
36 Autojoin []string
37 }
38
39 // channelRecord tracks a provisioned channel for TTL-based reaping.
40 type channelRecord struct {
41 name string
42 provisionedAt time.Time
43 }
44
45 // Manager provisions and maintains IRC channel topology.
46 type Manager struct {
47
--- internal/topology/topology.go
+++ internal/topology/topology.go
@@ -36,11 +36,11 @@
36 Autojoin []string
37 }
38
39 // channelRecord tracks a provisioned channel for TTL-based reaping.
40 type channelRecord struct {
41 name string
42 provisionedAt time.Time
43 }
44
45 // Manager provisions and maintains IRC channel topology.
46 type Manager struct {
47

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button