Skip to content

Commit

Permalink
Merge pull request #19 from hashicorp/biazmoreira/improvements-2
Browse files Browse the repository at this point in the history
Improvements to message output
  • Loading branch information
biazmoreira authored Dec 5, 2023
2 parents 87e9622 + fcfabc2 commit f86f2d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit f86f2d2

Please sign in to comment.