summaryrefslogtreecommitdiff
path: root/plugin/plaintext/text_out.go
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2026-04-28 18:24:00 +0000
committerGitHub <[email protected]>2026-04-28 18:24:00 +0000
commit8834c0be63ee88e0ad23fe621d5f5fe344b32089 (patch)
tree49029d2fd927e8832d05420d1bf1cf850aa22325 /plugin/plaintext/text_out.go
parent4f125e579472e5ed87fd052ef68ab80f5fe679b0 (diff)
Refactor all plugins to use functional options patterncopilot/refactor-plugins-functional-options
Agent-Logs-Url: https://github.com/Loyalsoldier/geoip/sessions/e2b66c9a-3d01-490c-9b31-32109cfe4feb Co-authored-by: Loyalsoldier <[email protected]>
Diffstat (limited to 'plugin/plaintext/text_out.go')
-rw-r--r--plugin/plaintext/text_out.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugin/plaintext/text_out.go b/plugin/plaintext/text_out.go
index 06f4df63..036ccf95 100644
--- a/plugin/plaintext/text_out.go
+++ b/plugin/plaintext/text_out.go
@@ -16,26 +16,26 @@ const (
func init() {
lib.RegisterOutputConfigCreator(TypeTextOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
- return newTextOut(TypeTextOut, DescTextOut, action, data)
+ return NewTextOutFromBytes(TypeTextOut, DescTextOut, action, data)
})
- lib.RegisterOutputConverter(TypeTextOut, &TextOut{
+ lib.RegisterOutputConverter(TypeTextOut, &textOut{
Description: DescTextOut,
})
}
-func (t *TextOut) GetType() string {
+func (t *textOut) GetType() string {
return t.Type
}
-func (t *TextOut) GetAction() lib.Action {
+func (t *textOut) GetAction() lib.Action {
return t.Action
}
-func (t *TextOut) GetDescription() string {
+func (t *textOut) GetDescription() string {
return t.Description
}
-func (t *TextOut) Output(container lib.Container) error {
+func (t *textOut) Output(container lib.Container) error {
for _, name := range t.filterAndSortList(container) {
entry, found := container.GetEntry(name)
if !found {
@@ -57,7 +57,7 @@ func (t *TextOut) Output(container lib.Container) error {
return nil
}
-func (t *TextOut) filterAndSortList(container lib.Container) []string {
+func (t *textOut) filterAndSortList(container lib.Container) []string {
excludeMap := make(map[string]bool)
for _, exclude := range t.Exclude {
if exclude = strings.ToUpper(strings.TrimSpace(exclude)); exclude != "" {