diff options
| author | anthropic-code-agent[bot] <[email protected]> | 2026-04-28 18:08:20 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-28 18:08:20 +0000 |
| commit | fbc2f20cdfc138b0146fcc61bcb7ed2c1776a076 (patch) | |
| tree | fada69f06625575fbda4a0533dd95316d7d0d2b6 /merge.go | |
| parent | 6fbcfeba5b73e4ac50ab0257040103cadf524ea7 (diff) | |
Complete functional options pattern refactoring for special pluginclaude/refactor-plugins-functional-options
Agent-Logs-Url: https://github.com/Loyalsoldier/geoip/sessions/0483b641-15da-4630-a3ad-53f8d1c65fe9
Co-authored-by: Loyalsoldier <[email protected]>
Diffstat (limited to 'merge.go')
| -rw-r--r-- | merge.go | 38 |
1 files changed, 15 insertions, 23 deletions
@@ -41,38 +41,30 @@ var mergeCmd = &cobra.Command{ } func getInputForMerge() lib.InputConverter { - return &special.Stdin{ - Type: special.TypeStdin, - Action: lib.ActionAdd, - Description: special.DescStdin, - Name: "temp", - } + return special.NewStdin( + lib.ActionAdd, + special.WithStdinName("temp"), + ) } func getOutputForMerge(otype string) lib.OutputConverter { switch lib.IPType(otype) { case lib.IPv4: - return &special.Stdout{ - Type: special.TypeStdout, - Action: lib.ActionOutput, - Description: special.DescStdout, - OnlyIPType: lib.IPv4, - } + return special.NewStdout( + lib.ActionOutput, + special.WithStdoutOnlyIPType(lib.IPv4), + ) case lib.IPv6: - return &special.Stdout{ - Type: special.TypeStdout, - Action: lib.ActionOutput, - Description: special.DescStdout, - OnlyIPType: lib.IPv6, - } + return special.NewStdout( + lib.ActionOutput, + special.WithStdoutOnlyIPType(lib.IPv6), + ) default: - return &special.Stdout{ - Type: special.TypeStdout, - Action: lib.ActionOutput, - Description: special.DescStdout, - } + return special.NewStdout( + lib.ActionOutput, + ) } } |
