undocker/internal/cmd/cmd.go
2021-05-24 00:11:58 +03:00

21 lines
327 B
Go

package cmd
import (
"io"
"os"
)
// BaseCommand provides common fields to all commands.
type BaseCommand struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
}
// Init initializes BaseCommand with default arguments
func (b *BaseCommand) Init() {
b.Stdin = os.Stdin
b.Stdout = os.Stdout
b.Stderr = os.Stderr
}