feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
23
vendor/k8s.io/cli-runtime/pkg/genericclioptions/io_options.go
generated
vendored
23
vendor/k8s.io/cli-runtime/pkg/genericclioptions/io_options.go
generated
vendored
@@ -19,22 +19,18 @@ package genericclioptions
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"k8s.io/cli-runtime/pkg/genericiooptions"
|
||||
)
|
||||
|
||||
// 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
|
||||
}
|
||||
// DEPRECATED: use genericiooptions.IOStreams
|
||||
type IOStreams = genericiooptions.IOStreams
|
||||
|
||||
// NewTestIOStreams returns a valid IOStreams and in, out, errout buffers for unit tests
|
||||
func NewTestIOStreams() (IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer) {
|
||||
// DEPRECATED: use genericiooptions.NewTestIOStreams
|
||||
func NewTestIOStreams() (genericiooptions.IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer) {
|
||||
in := &bytes.Buffer{}
|
||||
out := &bytes.Buffer{}
|
||||
errOut := &bytes.Buffer{}
|
||||
@@ -47,11 +43,12 @@ func NewTestIOStreams() (IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer)
|
||||
}
|
||||
|
||||
// NewTestIOStreamsDiscard returns a valid IOStreams that just discards
|
||||
func NewTestIOStreamsDiscard() IOStreams {
|
||||
// DEPRECATED: use genericiooptions.NewTestIOStreamsDiscard
|
||||
func NewTestIOStreamsDiscard() genericiooptions.IOStreams {
|
||||
in := &bytes.Buffer{}
|
||||
return IOStreams{
|
||||
In: in,
|
||||
Out: ioutil.Discard,
|
||||
ErrOut: ioutil.Discard,
|
||||
Out: io.Discard,
|
||||
ErrOut: io.Discard,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user