undocker/internal/cmd/cmd.go

21 lines
341 B
Go
Raw Normal View History

2021-05-24 00:11:58 +03:00
package cmd
import (
"io"
"os"
)
// BaseCommand provides common fields to all commands.
type BaseCommand struct {
Stdin io.ReadCloser
Stdout io.WriteCloser
Stderr io.WriteCloser
}
// Init initializes BaseCommand with default arguments
func (b *BaseCommand) Init() {
b.Stdin = os.Stdin
b.Stdout = os.Stdout
b.Stderr = os.Stderr
}