Skip to content

Commit

Permalink
all: gofmt
Browse files Browse the repository at this point in the history
Use gofmt in root directory, then ignore the changes in
the testdata directory and fix some formatting issues manually.
  • Loading branch information
Abirdcfly committed Aug 31, 2022
1 parent 248c34b commit 36f390d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions benchmark/parse/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ func TestParseLine(t *testing.T) {
// error handling cases
{
line: "BenchPress 100 19.6 ns/op", // non-benchmark
err: true,
err: true,
},
{
line: "BenchmarkEncrypt lots 19.6 ns/op", // non-int iterations
err: true,
err: true,
},
{
line: "BenchmarkBridge 100000000 19.6 smoots", // unknown unit
Expand Down
14 changes: 7 additions & 7 deletions gopls/internal/coverage/coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
// and a coverage report for all the packages under internal/lsp, accumulated by all the tests
// under gopls.
//
// -o controls where the coverage file is written, defaulting to /tmp/cover.out
// -i coverage-file will generate the report from an existing coverage file
// -v controls verbosity (0: only report coverage, 1: report as each directory is finished,
// 2: report on each test, 3: more details, 4: too much)
// -t tests only tests packages in the given comma-separated list of directories in gopls.
// The names should start with ., as in ./internal/regtest/bench
// -run tests. If set, -run tests is passed on to the go test command.
// -o controls where the coverage file is written, defaulting to /tmp/cover.out
// -i coverage-file will generate the report from an existing coverage file
// -v controls verbosity (0: only report coverage, 1: report as each directory is finished,
// 2: report on each test, 3: more details, 4: too much)
// -t tests only tests packages in the given comma-separated list of directories in gopls.
// The names should start with ., as in ./internal/regtest/bench
// -run tests. If set, -run tests is passed on to the go test command.
//
// Despite gopls' use of goroutines, the counts are almost deterministic.
package main
Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/diff/lcs/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
)

// For each D, vec[D] has length D+1,
// For each D, vec[D] has length D+1,
// and the label for (D, k) is stored in vec[D][(D+k)/2].
type label struct {
vec [][]int
Expand Down
8 changes: 4 additions & 4 deletions internal/typeparams/coretype.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ func CoreType(T types.Type) types.Type {
// restrictions may be arbitrarily complex. For example, consider the
// following:
//
// type A interface{ ~string|~[]byte }
// type A interface{ ~string|~[]byte }
//
// type B interface{ int|string }
// type B interface{ int|string }
//
// type C interface { ~string|~int }
// type C interface { ~string|~int }
//
// type T[P interface{ A|B; C }] int
// type T[P interface{ A|B; C }] int
//
// In this example, the structural type restriction of P is ~string|int: A|B
// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
Expand Down
9 changes: 4 additions & 5 deletions internal/typeparams/typeterm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36f390d

Please sign in to comment.