Files
kubevela/pkg/cmd/util/cmd.go
zzxwill bdb8af9492 Fix issue and refine README
1) Fix the issue when there are more than one traitdefinitions
2) Refine README
3) lowercase workload metadata.name so it could be used as dns
2020-07-17 13:40:50 +08:00

24 lines
484 B
Go

package util
import (
"fmt"
"io"
"os"
)
// IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing.
// Inconsistent and different names make it hard to read and review code
type IOStreams struct {
// In think, os.Stdin
In io.Reader
// Out think, os.Stdout
Out io.Writer
// ErrOut think, os.Stderr
ErrOut io.Writer
}
func PrintErrorMessage(errorMessage string, exitCode int) {
fmt.Println(errorMessage)
os.Exit(exitCode)
}