Merge pull request #75432 from draveness/feature/use-devnull-instead-of-stdin

feat: use ignore instead of stdin in genyaml cmd
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-04 13:21:18 -07:00 committed by GitHub
commit d18dae53a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,7 @@ limitations under the License.
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
@ -64,8 +65,7 @@ func main() {
// Set environment variables used by kubectl so the output is consistent,
// regardless of where we run.
os.Setenv("HOME", "/home/username")
// TODO os.Stdin should really be something like ioutil.Discard, but a Reader
kubectl := cmd.NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl := cmd.NewKubectlCommand(bytes.NewReader(nil), ioutil.Discard, ioutil.Discard)
genYaml(kubectl, "", outDir)
for _, c := range kubectl.Commands() {
genYaml(c, "kubectl", outDir)

BIN
cmd/genyaml/genyaml Executable file

Binary file not shown.