From fcfabc2017beada025db3287d3a99d6d390bace6 Mon Sep 17 00:00:00 2001 From: Bianca Moreira Date: Tue, 5 Dec 2023 14:42:20 +0100 Subject: [PATCH] Improvements to message output --- connect.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/connect.go b/connect.go index da658b6..3351913 100644 --- a/connect.go +++ b/connect.go @@ -178,7 +178,7 @@ func (c *HCPConnectCommand) getOrganization(rmOrgClient hcprmo.ClientService) (o case len(organizationsResp.GetPayload().Organizations) > 1: title := "Available organizations:" u := strings.Repeat("-", len(title)) - c.Ui.Info(fmt.Sprintf("%s %s \n", u, title)) + c.Ui.Info(fmt.Sprintf("%s \n %s \n", u, title)) orgs := make(map[string]*hcprmm.HashicorpCloudResourcemanagerOrganization, len(organizationsResp.GetPayload().Organizations)) for _, org := range organizationsResp.GetPayload().Organizations { @@ -224,7 +224,7 @@ func (c *HCPConnectCommand) getProject(organizationID string, rmProjClient hcprm case len(projectResp.GetPayload().Projects) > 1: title := "Available projects:" u := strings.Repeat("-", len(title)) - c.Ui.Info(fmt.Sprintf("%s %s \n", u, title)) + c.Ui.Info(fmt.Sprintf("%s \n %s \n", u, title)) projs := make(map[string]*hcprmm.HashicorpCloudResourcemanagerProject, len(projectResp.GetPayload().Projects)) for _, proj := range projectResp.GetPayload().Projects { @@ -273,7 +273,7 @@ func (c *HCPConnectCommand) getCluster(organizationID string, projectID string, title := "HCP Vault Cluster:" u := strings.Repeat("-", len(title)) - c.Ui.Info(fmt.Sprintf("%s %s: %s \n", u, title, cluster.ID)) + c.Ui.Info(fmt.Sprintf("%s \n %s: %s \n", u, title, cluster.ID)) proxyAddr = "https://" + cluster.DNSNames.Proxy return proxyAddr, nil @@ -298,7 +298,7 @@ func (c *HCPConnectCommand) listClusters(organizationID string, projectID string case len(clustersResp.GetPayload().Clusters) > 1: title := "Available clusters:" u := strings.Repeat("-", len(title)) - c.Ui.Info(fmt.Sprintf("%s %s \n", u, title)) + c.Ui.Info(fmt.Sprintf("%s \n %s \n", u, title)) clusters := make(map[string]*hcpvsm.HashicorpCloudVault20201125Cluster, len(clustersResp.GetPayload().Clusters)) for _, cluster := range clustersResp.GetPayload().Clusters {