summaryrefslogtreecommitdiff
path: root/plugin/plaintext/text_out.go
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2024-08-06 09:15:52 +0800
committerLoyalsoldier <[email protected]>2024-08-06 09:15:52 +0800
commitee2fd80a8ff2094c89a890857e0b7f285dff8f86 (patch)
treedd48f594485dad1306a02cbb5347e46adf0b9bbc /plugin/plaintext/text_out.go
parentfa11a12015d982ef095442d38ef0f42a0559b2c6 (diff)
Feat: support to customize output file extension in all plaintext formats
Diffstat (limited to 'plugin/plaintext/text_out.go')
-rw-r--r--plugin/plaintext/text_out.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/plaintext/text_out.go b/plugin/plaintext/text_out.go
index 6db90388..10ad6143 100644
--- a/plugin/plaintext/text_out.go
+++ b/plugin/plaintext/text_out.go
@@ -50,7 +50,7 @@ func (t *textOut) Output(container lib.Container) error {
if err != nil {
return err
}
- filename := strings.ToLower(entry.GetName()) + ".txt"
+ filename := strings.ToLower(entry.GetName()) + t.OutputExt
if err := t.writeFile(filename, data); err != nil {
return err
}
@@ -67,7 +67,7 @@ func (t *textOut) Output(container lib.Container) error {
if err != nil {
return err
}
- filename := strings.ToLower(entry.GetName()) + ".txt"
+ filename := strings.ToLower(entry.GetName()) + t.OutputExt
if err := t.writeFile(filename, data); err != nil {
return err
}