perf(cli): optimize CPU consumption of help pages (#9607)

This change reduces the CPU consumption of --help by ~50%.

Also, this change removes ANSI escape codes from our golden files. I
don't think those were worth the inability to parallelize golden file tests and
global state fragility.
This commit is contained in:
Ammar Bandukwala
2023-09-14 19:48:29 -05:00
committed by GitHub
parent 7311ffbd9d
commit b63dfe7b75
93 changed files with 854 additions and 828 deletions
+13 -13
View File
@@ -1,6 +1,6 @@
coder v0.0.0-devel
USAGE:
USAGE:
coder [global-flags] <subcommand>
Coder v0.0.0-devel — A tool for provisioning self-hosted development
@@ -13,7 +13,7 @@ coder v0.0.0-devel
$ coder templates init
SUBCOMMANDS:
SUBCOMMANDS:
config-ssh Add an SSH Host entry for your workspaces "ssh
coder.workspace"
create Create a workspace
@@ -49,42 +49,42 @@ coder v0.0.0-devel
users Manage users
version Show coder version
GLOBAL OPTIONS:
GLOBAL OPTIONS:
Global options are applied to all commands. They can be set using environment
variables or flags.
--debug-options bool
--debug-options bool
Print all options, how they're set, then exit.
--disable-direct-connections bool, $CODER_DISABLE_DIRECT_CONNECTIONS
--disable-direct-connections bool, $CODER_DISABLE_DIRECT_CONNECTIONS
Disable direct (P2P) connections to workspaces.
--global-config string, $CODER_CONFIG_DIR (default: ~/.config/coderv2)
--global-config string, $CODER_CONFIG_DIR (default: ~/.config/coderv2)
Path to the global `coder` config directory.
--header string-array, $CODER_HEADER
--header string-array, $CODER_HEADER
Additional HTTP headers added to all requests. Provide as key=value.
Can be specified multiple times.
--header-command string, $CODER_HEADER_COMMAND
--header-command string, $CODER_HEADER_COMMAND
An external command that outputs additional HTTP headers added to all
requests. The command must output each header as `key=value` on its
own line.
--no-feature-warning bool, $CODER_NO_FEATURE_WARNING
--no-feature-warning bool, $CODER_NO_FEATURE_WARNING
Suppress warnings about unlicensed features.
--no-version-warning bool, $CODER_NO_VERSION_WARNING
--no-version-warning bool, $CODER_NO_VERSION_WARNING
Suppress warning when client and server versions do not match.
--token string, $CODER_SESSION_TOKEN
--token string, $CODER_SESSION_TOKEN
Specify an authentication token. For security reasons setting
CODER_SESSION_TOKEN is preferred.
--url url, $CODER_URL
--url url, $CODER_URL
URL to a deployment.
-v, --verbose bool, $CODER_VERBOSE
-v, --verbose bool, $CODER_VERBOSE
Enable verbose output.
———