v0.2.0 #3

Merged
kor-elf merged 22 commits from develop into main 2026-04-26 16:50:47 +05:00
2 changed files with 10 additions and 0 deletions
Showing only changes of commit 94405fbb53 - Show all commits
+3
View File
@@ -8,6 +8,9 @@ type NFT interface {
// You can execute your raw request. // You can execute your raw request.
Command() Command Command() Command
// ExecuteBatchAfterCheck executes a batch of commands after checking the validity of the batch.
ExecuteBatchAfterCheck(batch Batch) error
// ExecuteBatch executes a batch of commands. // ExecuteBatch executes a batch of commands.
ExecuteBatch(batch Batch) error ExecuteBatch(batch Batch) error
+7
View File
@@ -104,6 +104,13 @@ func (n *nft) Command() contract.Command {
return n.command return n.command
} }
func (n *nft) ExecuteBatchAfterCheck(batch contract.Batch) error {
if err := batch.Check(n.command); err != nil {
return err
}
return n.command.Run(batch.Args()...)
}
func (n *nft) ExecuteBatch(batch contract.Batch) error { func (n *nft) ExecuteBatch(batch contract.Batch) error {
return n.command.Run(batch.Args()...) return n.command.Run(batch.Args()...)
} }