Refactor Command interface to embed CommandRun for improved structure and consistency
This commit is contained in:
+5
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user