diff --git a/batch.go b/batch.go index e46c63a..5f9b6e0 100644 --- a/batch.go +++ b/batch.go @@ -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...) diff --git a/contract/batch.go b/contract/batch.go index b4a0fe3..0a3f871 100644 --- a/contract/batch.go +++ b/contract/batch.go @@ -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: