From 657000b75ba16eacdf70b3b27d16530cad67bd05 Mon Sep 17 00:00:00 2001 From: Bojan Zivanovic Date: Fri, 11 Aug 2023 11:17:28 +0200 Subject: [PATCH] Use blue color for subheadings. --- cmd/broom/add.go | 12 ++++++------ cmd/broom/profile.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/broom/add.go b/cmd/broom/add.go index f987df1..a93a41b 100644 --- a/cmd/broom/add.go +++ b/cmd/broom/add.go @@ -108,16 +108,16 @@ func addUsage() { fmt.Fprintln(color.Output, "the specification, unless they are provided via options.") fmt.Fprintln(color.Output, "") fmt.Fprintln(color.Output, color.YellowString("Examples:")) - fmt.Fprintln(color.Output, " Single profile:") + fmt.Fprintln(color.Output, " ", color.BlueString("Single profile")) fmt.Fprintln(color.Output, ` broom add api openapi.yaml`) fmt.Fprintln(color.Output, "") - fmt.Fprintln(color.Output, " Single profile with Bearer auth via external command:") - fmt.Fprintln(color.Output, ` broom add api openapi.json --auth-cmd="sh get-token.sh" --auth-type=bearer`) - fmt.Fprintln(color.Output, "") - fmt.Fprintln(color.Output, " Single profile with Basic auth:") + fmt.Fprintln(color.Output, " ", color.BlueString("Single profile with Basic auth")) fmt.Fprintln(color.Output, ` broom add api openapi.yaml --auth="myuser:mypass" --auth-type=basic`) fmt.Fprintln(color.Output, "") - fmt.Fprintln(color.Output, " Multiple profiles with different API keys:") + fmt.Fprintln(color.Output, " ", color.BlueString("Single profile with Bearer auth via external command")) + fmt.Fprintln(color.Output, ` broom add api openapi.json --auth-cmd="sh get-token.sh" --auth-type=bearer`) + fmt.Fprintln(color.Output, "") + fmt.Fprintln(color.Output, " ", color.BlueString("Multiple profiles with different API keys")) fmt.Fprintln(color.Output, ` broom add prod openapi.yaml --auth=PRODUCTION_KEY --auth-type=api-key`) fmt.Fprintln(color.Output, ` broom add staging openapi.yaml --auth=STAGING_KEY --auth-type=api-key --server-url=htts://staging.my-api.io`) fmt.Fprintln(color.Output, "") diff --git a/cmd/broom/profile.go b/cmd/broom/profile.go index 6e1aa31..f396d82 100644 --- a/cmd/broom/profile.go +++ b/cmd/broom/profile.go @@ -96,7 +96,7 @@ func profileUsage(profile string, serverURL string, ops broom.Operations) { fmt.Fprintln(color.Output, color.YellowString("Operations:")) w := tabwriter.NewWriter(color.Output, 0, 1, 4, ' ', 0) for _, tag := range ops.Tags() { - fmt.Fprintf(w, "\t%v\t\t\n", tag) + fmt.Fprintf(w, "\t%v\t\t\n", color.BlueString(tag)) for _, op := range ops.ByTag(tag) { fmt.Fprintf(w, "\t %v\t%v\n", color.GreenString(op.ID), op.SummaryWithFlags()) }