Skip to content

Commit

Permalink
gopls/internal/cmd/help_test.go: document
Browse files Browse the repository at this point in the history
Change-Id: Ia1d242e67fe36d5042891ee2db69a01b092d6b84
Reviewed-on: https://go-review.googlesource.com/c/tools/+/544256
Auto-Submit: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
adonovan authored and gopherbot committed Nov 21, 2023
1 parent daa4aa5 commit b19be0f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gopls/internal/cmd/help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

package cmd_test

// This file defines tests to ensure the cmd/usage/*.hlp files match
// the output of the tool. The .hlp files are not actually needed by
// the executable (they are not //go:embed-ded, say), but they make it
// easier to review changes to the gopls command's help logic since
// any effects are manifest as changes to these files.

//go:generate go test -run Help -update-help-files

import (
"bytes"
"context"
Expand All @@ -18,8 +26,6 @@ import (
"golang.org/x/tools/internal/tool"
)

//go:generate go test -run Help -update-help-files

var updateHelpFiles = flag.Bool("update-help-files", false, "Write out the help files instead of checking them")

const appName = "gopls"
Expand Down

0 comments on commit b19be0f

Please sign in to comment.