Refactor Command interface to embed CommandRun for improved structure and consistency

This commit is contained in:
2026-04-26 15:25:50 +05:00
parent 94405fbb53
commit c4bd51d9bc
+5 -4
View File
@@ -1,11 +1,12 @@
package contract
// Run is a function that executes nft command.
type Run func(arg ...string) error
type CommandRun interface {
// Run executes nft command.
Run(arg ...string) error
}
type Command interface {
// Run nft command.
Run(arg ...string) error
CommandRun
// RunWithOutput Run nft command with output.
RunWithOutput(arg ...string) (string, error)