From db7f5cf9049d2ece0a4e41897f082dfa396e7263 Mon Sep 17 00:00:00 2001 From: kai Date: Thu, 18 May 2023 17:22:04 +0100 Subject: [PATCH] Update 'waiting for connections' message. #3394 --- pkg/steampipeconfig/load_connection_state.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/steampipeconfig/load_connection_state.go b/pkg/steampipeconfig/load_connection_state.go index 186c3fac9..44b4254ba 100644 --- a/pkg/steampipeconfig/load_connection_state.go +++ b/pkg/steampipeconfig/load_connection_state.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "os" - "strings" "time" "github.com/jackc/pgx/v5" @@ -157,11 +156,12 @@ func GetLoadingConnectionStatusMessage(connectionStateMap ConnectionStateMap, re totalCount, utils.Pluralize("connection", totalCount)) - if len(requiredSchemas) == 0 { - return loadedMessage + if len(requiredSchemas) == 1 { + // if we are only waiting for a single schema, include that in the message + return fmt.Sprintf("Waiting for connection '%s' to load (%s)", requiredSchemas[0], loadedMessage) } - // TODO think about display of arrays - return fmt.Sprintf("Waiting for %s '%s' to load (%s)", utils.Pluralize("connection", len(requiredSchemas)), strings.Join(requiredSchemas, "','"), loadedMessage) + + return loadedMessage } func SaveConnectionStateFile(res *RefreshConnectionResult, connectionUpdates *ConnectionUpdates) {