From 8345a3e422ef616d5e5b37a3e32380957839da2a Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 7 Jun 2023 09:47:29 +0100 Subject: [PATCH] fixup! fix(cli): speed up CLI over SSH (#7885) --- cli/root.go | 2 +- cli/server_slim.go | 2 +- enterprise/cli/proxyserver_slim.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/root.go b/cli/root.go index d79f479cc3429..cec87f09d114e 100644 --- a/cli/root.go +++ b/cli/root.go @@ -687,7 +687,7 @@ func formatExamples(examples ...example) string { " - " + padStyle.Render(e.Description + ":")[4:] + "\n\n ", ) } - // We add 1 space here because `cliui.Styles.Code` adds an extra + // We add 1 space here because `cliui.DefaultStyles.Code` adds an extra // space. This makes the code block align at an even 2 or 6 // spaces for symmetry. _, _ = sb.WriteString(" " + cliui.DefaultStyles.Code.Render(fmt.Sprintf("$ %s", e.Command))) diff --git a/cli/server_slim.go b/cli/server_slim.go index 417a32ff13ae7..4703f20b7669f 100644 --- a/cli/server_slim.go +++ b/cli/server_slim.go @@ -30,7 +30,7 @@ func (r *RootCmd) Server(_ func(context.Context, *coderd.Options) (*coderd.API, } func serverUnsupported(w io.Writer) { - _, _ = fmt.Fprintf(w, "You are using a 'slim' build of Coder, which does not support the %s subcommand.\n", cliui.Styles.Code.Render("server")) + _, _ = fmt.Fprintf(w, "You are using a 'slim' build of Coder, which does not support the %s subcommand.\n", cliui.DefaultStyles.Code.Render("server")) _, _ = fmt.Fprintln(w, "") _, _ = fmt.Fprintln(w, "Please use a build of Coder from GitHub releases:") _, _ = fmt.Fprintln(w, " https://github.com/coder/coder/releases") diff --git a/enterprise/cli/proxyserver_slim.go b/enterprise/cli/proxyserver_slim.go index d484c43bde298..48dd85710ded7 100644 --- a/enterprise/cli/proxyserver_slim.go +++ b/enterprise/cli/proxyserver_slim.go @@ -29,7 +29,7 @@ func (r *RootCmd) proxyServer() *clibase.Cmd { } func serverUnsupported(w io.Writer) { - _, _ = fmt.Fprintf(w, "You are using a 'slim' build of Coder, which does not support the %s subcommand.\n", cliui.Styles.Code.Render("server")) + _, _ = fmt.Fprintf(w, "You are using a 'slim' build of Coder, which does not support the %s subcommand.\n", cliui.DefaultStyles.Code.Render("server")) _, _ = fmt.Fprintln(w, "") _, _ = fmt.Fprintln(w, "Please use a build of Coder from GitHub releases:") _, _ = fmt.Fprintln(w, " https://github.com/coder/coder/releases")