Merge pull request #79493 from odinuge/kube-cmd-double-print

Remove duplicate error messages from cli commands
This commit is contained in:
Kubernetes Prow Robot
2019-06-28 13:57:41 -07:00
committed by GitHub
10 changed files with 0 additions and 19 deletions

View File

@@ -20,7 +20,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -48,7 +47,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -61,7 +61,6 @@ func main() {
basename := filepath.Base(os.Args[0]) basename := filepath.Base(os.Args[0])
if err := commandFor(basename, hyperkubeCommand, allCommandFns).Execute(); err != nil { if err := commandFor(basename, hyperkubeCommand, allCommandFns).Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -19,7 +19,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -43,7 +42,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -21,7 +21,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -45,7 +44,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -18,7 +18,6 @@ package main
import ( import (
goflag "flag" goflag "flag"
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -47,7 +46,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -17,7 +17,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -45,7 +44,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -17,7 +17,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"os" "os"
"k8s.io/klog" "k8s.io/klog"
@@ -27,8 +26,6 @@ import (
func main() { func main() {
klog.InitFlags(nil) klog.InitFlags(nil)
if err := app.Run(); err != nil { if err := app.Run(); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
os.Exit(0)
} }

View File

@@ -18,7 +18,6 @@ package main
import ( import (
goflag "flag" goflag "flag"
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -48,7 +47,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -21,7 +21,6 @@ limitations under the License.
package main package main
import ( import (
"fmt"
"math/rand" "math/rand"
"os" "os"
"time" "time"
@@ -40,7 +39,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }

View File

@@ -116,7 +116,6 @@ func main() {
defer logs.FlushLogs() defer logs.FlushLogs()
if err := command.Execute(); err != nil { if err := command.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1) os.Exit(1)
} }
} }