From 94d5c2e33da1af733644932003d619a7ba537207 Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Tue, 2 Mar 2021 03:06:39 -0600 Subject: [PATCH] Don't fail on extension startup --- cmd/gotop/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go index c021515..3a33535 100644 --- a/cmd/gotop/main.go +++ b/cmd/gotop/main.go @@ -21,8 +21,8 @@ import ( "github.com/VictoriaMetrics/metrics" jj "github.com/cloudfoundry-attic/jibber_jabber" ui "github.com/gizak/termui/v3" - "github.com/xxxserxxx/lingo" "github.com/shibukawa/configdir" + "github.com/xxxserxxx/lingo" "github.com/xxxserxxx/opflag" "github.com/xxxserxxx/gotop/v4" @@ -405,12 +405,9 @@ func run() int { } defer logfile.Close() - errs := devices.Startup(conf.ExtensionVars) - if len(errs) > 0 { - for _, err := range errs { - stderrLogger.Print(err) - } - return 1 + // device initialization errors do not stop execution + for _, err := range devices.Startup(conf.ExtensionVars) { + stderrLogger.Print(err) } lstream, err := getLayout(conf)