summaryrefslogtreecommitdiff
path: root/plugin/plaintext
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2024-07-06 18:04:33 +0800
committerLoyalsoldier <[email protected]>2024-07-06 18:04:33 +0800
commite3800440ce05aa1b8f27d56f47bbeef20f9499c6 (patch)
tree5c85e84b7c02713b75738649e483b5758027d011 /plugin/plaintext
parent5843ee29c435b393bec57a367775c2f4e266eedc (diff)
Fix: remove entry & prefix
Diffstat (limited to 'plugin/plaintext')
-rw-r--r--plugin/plaintext/text_in.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin/plaintext/text_in.go b/plugin/plaintext/text_in.go
index 246a4ac1..0180e52c 100644
--- a/plugin/plaintext/text_in.go
+++ b/plugin/plaintext/text_in.go
@@ -106,7 +106,7 @@ func (t *textIn) Input(container lib.Container) (lib.Container, error) {
}
if len(entries) == 0 {
- return nil, fmt.Errorf("type %s | action %s no entry are generated", t.Type, t.Action)
+ return nil, fmt.Errorf("type %s | action %s no entry is generated", t.Type, t.Action)
}
for _, entry := range entries {
@@ -116,7 +116,11 @@ func (t *textIn) Input(container lib.Container) (lib.Container, error) {
return nil, err
}
case lib.ActionRemove:
- container.Remove(entry.GetName(), ignoreIPType)
+ if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil {
+ return nil, err
+ }
+ default:
+ return nil, lib.ErrUnknownAction
}
}