diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-16 03:51:43 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-16 03:51:43 +0200 |
| commit | de3e878ad12bbd3e609bd5b7d741fc792c72f255 (patch) | |
| tree | 06d92b93ea0ad532c5d3a761033baac05abe2a5e /internal/slashcommands | |
| parent | 2e9cabb1c8bf1f0246e513fe1f86a552e07eee94 (diff) | |
Decompose App God struct into embedded section structs
Replace 60+ flat fields in App with 4 embedded section structs:
CoreConfig, ProviderConfig, PromptConfig, FeatureConfig. Go field
promotion preserves all existing field access patterns. Updated
flattenAppConfig to recurse into embedded structs for runtimeconfig.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/slashcommands')
| -rw-r--r-- | internal/slashcommands/syncer_test.go | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/internal/slashcommands/syncer_test.go b/internal/slashcommands/syncer_test.go index 7ae13dd..01c6d28 100644 --- a/internal/slashcommands/syncer_test.go +++ b/internal/slashcommands/syncer_test.go @@ -13,7 +13,7 @@ import ( func TestNewSyncer_Disabled(t *testing.T) { cfg := appconfig.App{ - MCPSlashCommandSync: false, + FeatureConfig: appconfig.FeatureConfig{MCPSlashCommandSync: false}, } syncer, err := NewSyncer(cfg) @@ -28,8 +28,10 @@ func TestNewSyncer_Disabled(t *testing.T) { func TestNewSyncer_NoDirectory(t *testing.T) { cfg := appconfig.App{ - MCPSlashCommandSync: true, - MCPSlashCommandDir: "", + FeatureConfig: appconfig.FeatureConfig{ + MCPSlashCommandSync: true, + MCPSlashCommandDir: "", + }, } _, err := NewSyncer(cfg) @@ -43,8 +45,10 @@ func TestNewSyncer_CreatesDirectory(t *testing.T) { testDir := filepath.Join(tmpDir, "test-commands") cfg := appconfig.App{ - MCPSlashCommandSync: true, - MCPSlashCommandDir: testDir, + FeatureConfig: appconfig.FeatureConfig{ + MCPSlashCommandSync: true, + MCPSlashCommandDir: testDir, + }, } syncer, err := NewSyncer(cfg) @@ -71,8 +75,10 @@ func TestNewSyncer_ExpandsHomeDirectory(t *testing.T) { defer os.Setenv("HOME", home) cfg := appconfig.App{ - MCPSlashCommandSync: true, - MCPSlashCommandDir: "~/test-commands", + FeatureConfig: appconfig.FeatureConfig{ + MCPSlashCommandSync: true, + MCPSlashCommandDir: "~/test-commands", + }, } syncer, err := NewSyncer(cfg) |
