Switch to fmt.Sprintf for appending a newline in CommandRun for consistency
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package batch
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.kor-elf.net/kor-elf-shield/go-nftables-client/contract"
|
||||
@@ -18,6 +19,6 @@ func NewCommand(file *pkg.File) contract.CommandRun {
|
||||
}
|
||||
|
||||
func (c *commandRun) Run(args ...string) error {
|
||||
_, err := c.file.Write([]byte(strings.Join(args, " ")))
|
||||
_, err := c.file.Write([]byte(fmt.Sprintf("%s\n", strings.Join(args, " "))))
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user