Skip to content

Commit

Permalink
gopls/internal/cmd: Improve help texts
Browse files Browse the repository at this point in the history
`gopls check` operates on multiple files, so I made the help text
reflect that fact.
  • Loading branch information
silverwind committed Apr 27, 2024
1 parent 0b45163 commit f6774df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gopls/internal/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type check struct {

func (c *check) Name() string { return "check" }
func (c *check) Parent() string { return c.app.Name() }
func (c *check) Usage() string { return "<filename>" }
func (c *check) ShortHelp() string { return "show diagnostic results for the specified file" }
func (c *check) Usage() string { return "<files>" }
func (c *check) ShortHelp() string { return "show diagnostic results for the specified files" }
func (c *check) DetailedHelp(f *flag.FlagSet) {
fmt.Fprint(f.Output(), `
Example: show the diagnostic results of this file:
Expand Down
4 changes: 2 additions & 2 deletions gopls/internal/cmd/usage/check.hlp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
show diagnostic results for the specified file
show diagnostic results for the specified files

Usage:
gopls [flags] check <filename>
gopls [flags] check <files>

Example: show the diagnostic results of this file:

Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/usage/usage-v.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Main

Features
call_hierarchy display selected identifier's call hierarchy
check show diagnostic results for the specified file
check show diagnostic results for the specified files
codelens List or execute code lenses for a file
definition show declaration of selected identifier
execute Execute a gopls custom LSP command
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/usage/usage.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Main

Features
call_hierarchy display selected identifier's call hierarchy
check show diagnostic results for the specified file
check show diagnostic results for the specified files
codelens List or execute code lenses for a file
definition show declaration of selected identifier
execute Execute a gopls custom LSP command
Expand Down

0 comments on commit f6774df

Please sign in to comment.