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 package contract
// Run is a function that executes nft command. type CommandRun interface {
type Run func(arg ...string) error // Run executes nft command.
Run(arg ...string) error
}
type Command interface { type Command interface {
// Run nft command. CommandRun
Run(arg ...string) error
// RunWithOutput Run nft command with output. // RunWithOutput Run nft command with output.
RunWithOutput(arg ...string) (string, error) RunWithOutput(arg ...string) (string, error)