Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs for these settings in [1]. With this change, our compiled Linux binary (without libvirt) drops from ~240 MB to ~130 MB. Alex was concerned about panic support, but with: $ git diff -U1 diff --git a/cmd/openshift-install/main.go b/cmd/openshift-install/main.go index 37f7f96..fbd9889 100644 --- a/cmd/openshift-install/main.go +++ b/cmd/openshift-install/main.go @@ -69,2 +69,4 @@ func newRootCmd() *cobra.Command { func runRootCmd(cmd *cobra.Command, args []string) { + panic("testing, testing") + logrus.SetOutput(ioutil.Discard) panics still produce useful tracebacks: $ openshift-install create install-config panic: testing, testing goroutine 1 [running]: main.runRootCmd(0x8575360, 0x85d4390, 0x0, 0x0) /.../go/src/github.com/openshift/installer/cmd/openshift-install/main.go:70 +0x39 github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).execute(0x8575360, 0x85d4390, 0x0, 0x0, 0x8575360, 0x85d4390) /.../go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:746 +0x237 github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42044f180, 0x0, 0xc4209cc500, 0xc42044f2d0) /.../go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:852 +0x30a github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42044f180, 0xc420983ec0, 0x1) /.../go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:800 +0x2b main.installerMain() /.../go/src/github.com/openshift/installer/cmd/openshift-install/main.go:50 +0x132 main.main() /.../go/src/github.com/openshift/installer/cmd/openshift-install/main.go:34 +0x39 which looks fine. [1]: https://golang.org/cmd/link/ Suggested-by: Pedro Jose Amoedo Martinez
- Loading branch information