ScuttleBot
fix: gofmt — format config and topology files
Commit
8332dd8ed62c9fc59a17fb02459e50dbcd8eaecddcf8cad716819b64dd6322d8
Parent
336984bb60f6490…
3 files changed
+2
-2
+3
-3
+1
-1
+2
-2
| --- internal/config/config.go | ||
| +++ internal/config/config.go | ||
| @@ -40,12 +40,12 @@ | ||
| 40 | 40 | |
| 41 | 41 | // LoggingConfig configures message logging. |
| 42 | 42 | type LoggingConfig struct { |
| 43 | 43 | Enabled bool `yaml:"enabled" json:"enabled"` |
| 44 | 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" | |
| 45 | + Format string `yaml:"format" json:"format"` // "jsonl" | "csv" | "text" | |
| 46 | + Rotation string `yaml:"rotation" json:"rotation"` // "none" | "daily" | "weekly" | "size" | |
| 47 | 47 | MaxSizeMB int `yaml:"max_size_mb" json:"max_size_mb"` |
| 48 | 48 | PerChannel bool `yaml:"per_channel" json:"per_channel"` |
| 49 | 49 | MaxAgeDays int `yaml:"max_age_days" json:"max_age_days"` |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 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.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 |
+3
-3
| --- internal/config/config_test.go | ||
| +++ internal/config/config_test.go | ||
| @@ -173,13 +173,13 @@ | ||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | func TestDurationJSONUnmarshalErrors(t *testing.T) { |
| 177 | 177 | 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 | |
| 181 | 181 | } |
| 182 | 182 | for _, tc := range cases { |
| 183 | 183 | var d Duration |
| 184 | 184 | if err := json.Unmarshal([]byte(tc.input), &d); err == nil { |
| 185 | 185 | t.Errorf("Unmarshal(%s): expected error, got nil", tc.input) |
| 186 | 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/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 |
+1
-1
| --- internal/topology/topology.go | ||
| +++ internal/topology/topology.go | ||
| @@ -36,11 +36,11 @@ | ||
| 36 | 36 | Autojoin []string |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // channelRecord tracks a provisioned channel for TTL-based reaping. |
| 40 | 40 | type channelRecord struct { |
| 41 | - name string | |
| 41 | + name string | |
| 42 | 42 | provisionedAt time.Time |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // Manager provisions and maintains IRC channel topology. |
| 46 | 46 | type Manager struct { |
| 47 | 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 |
| --- 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 |