Add Command method to BatchBuilder interface and implementation

This commit is contained in:
2026-04-26 16:27:46 +05:00
parent 2037ac6034
commit 692ba5fba0
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -42,6 +42,10 @@ func NewBatchBuilder(dir string) (contract.BatchBuilder, error) {
}, nil
}
func (b *batchBuilder) Command() contract.CommandRun {
return b.command
}
func (b *batchBuilder) Clear() error {
args := nftCommand.Clear()
return b.command.Run(args...)
+3
View File
@@ -6,6 +6,9 @@ import (
// BatchBuilder is an API for building a batch of commands.
type BatchBuilder interface {
// Command returns the command to run.
Command() CommandRun
// Clear clears all rules.
//
// This command is equivalent to: