From dfda270ebaf8e35409c45ac37eb73139618c9f74 Mon Sep 17 00:00:00 2001 From: Ian Cottrell Date: Wed, 24 Nov 2021 17:34:55 -0500 Subject: [PATCH] gopls: use the = form in flag parameter printing rather than a space For #41860 Change-Id: I9956d06aa26df54f57a4fedb30b36fe39f19ee3e Reviewed-on: https://go-review.googlesource.com/c/tools/+/367840 Trust: Ian Cottrell Run-TryBot: Ian Cottrell Reviewed-by: Robert Findley gopls-CI: kokoro TryBot-Result: Gopher Robot --- internal/lsp/cmd/cmd.go | 2 +- internal/lsp/cmd/usage/serve.hlp | 18 ++++++------- internal/lsp/cmd/usage/usage.hlp | 28 ++++++++++----------- internal/lsp/cmd/usage/workspace_symbol.hlp | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/internal/lsp/cmd/cmd.go b/internal/lsp/cmd/cmd.go index e67a966cda..13020d4df3 100644 --- a/internal/lsp/cmd/cmd.go +++ b/internal/lsp/cmd/cmd.go @@ -167,7 +167,7 @@ func printFlagDefaults(s *flag.FlagSet) { f := entry[0] name, usage := flag.UnquoteUsage(f) if len(name) > 0 { - b.WriteString(" ") + b.WriteString("=") b.WriteString(name) } // Boolean flags of one ASCII letter are so common we diff --git a/internal/lsp/cmd/usage/serve.hlp b/internal/lsp/cmd/usage/serve.hlp index 3460a2725a..74c181de9d 100644 --- a/internal/lsp/cmd/usage/serve.hlp +++ b/internal/lsp/cmd/usage/serve.hlp @@ -7,23 +7,23 @@ The server communicates using JSONRPC2 on stdin and stdout, and is intended to b a child of an editor process. server-flags: - -debug string + -debug=string serve debug information on the supplied address - -listen string + -listen=string address on which to listen for remote connections. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. Otherwise, TCP is used. - -listen.timeout duration + -listen.timeout=duration when used with -listen, shut down the server when there are no connected clients for this duration - -logfile string + -logfile=string filename to log to. if value is "auto", then logging to a default output file is enabled - -mode string + -mode=string no effect - -port int + -port=int port on which to run gopls for debugging purposes - -remote.debug string + -remote.debug=string when used with -remote=auto, the -debug value used to start the daemon - -remote.listen.timeout duration + -remote.listen.timeout=duration when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) - -remote.logfile string + -remote.logfile=string when used with -remote=auto, the -logfile value used to start the daemon -rpc.trace print the full rpc trace in lsp inspector format diff --git a/internal/lsp/cmd/usage/usage.hlp b/internal/lsp/cmd/usage/usage.hlp index b01803b4cb..5f2a70cbbb 100644 --- a/internal/lsp/cmd/usage/usage.hlp +++ b/internal/lsp/cmd/usage/usage.hlp @@ -39,33 +39,33 @@ Features workspace_symbol search symbols in workspace flags: - -debug string + -debug=string serve debug information on the supplied address - -listen string + -listen=string address on which to listen for remote connections. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. Otherwise, TCP is used. - -listen.timeout duration + -listen.timeout=duration when used with -listen, shut down the server when there are no connected clients for this duration - -logfile string + -logfile=string filename to log to. if value is "auto", then logging to a default output file is enabled - -mode string + -mode=string no effect - -ocagent string + -ocagent=string the address of the ocagent (e.g. http://localhost:55678), or off (default "off") - -port int + -port=int port on which to run gopls for debugging purposes - -profile.cpu string + -profile.cpu=string write CPU profile to this file - -profile.mem string + -profile.mem=string write memory profile to this file - -profile.trace string + -profile.trace=string write trace log to this file - -remote string + -remote=string forward all commands to a remote lsp specified by this flag. With no special prefix, this is assumed to be a TCP address. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. If 'auto', or prefixed by 'auto;', the remote address is automatically resolved based on the executing environment. - -remote.debug string + -remote.debug=string when used with -remote=auto, the -debug value used to start the daemon - -remote.listen.timeout duration + -remote.listen.timeout=duration when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) - -remote.logfile string + -remote.logfile=string when used with -remote=auto, the -logfile value used to start the daemon -rpc.trace print the full rpc trace in lsp inspector format diff --git a/internal/lsp/cmd/usage/workspace_symbol.hlp b/internal/lsp/cmd/usage/workspace_symbol.hlp index 697e26f975..a61b47b332 100644 --- a/internal/lsp/cmd/usage/workspace_symbol.hlp +++ b/internal/lsp/cmd/usage/workspace_symbol.hlp @@ -8,6 +8,6 @@ Example: $ gopls workspace_symbol -matcher fuzzy 'wsymbols' workspace_symbol-flags: - -matcher string + -matcher=string specifies the type of matcher: fuzzy, caseSensitive, or caseInsensitive. The default is caseInsensitive.