зеркало из https://github.com/golang/tools.git
all: gofmt format
Change-Id: I8419bdaab5164388de846ccd942af1914ef944b7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/520075 gopls-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Родитель
b225aa0590
Коммит
9f2e103e08
|
@ -12,8 +12,8 @@ import (
|
|||
"go/types"
|
||||
"text/template"
|
||||
|
||||
"golang.org/x/tools/internal/imports"
|
||||
"golang.org/x/tools/gopls/internal/lsp/command/commandmeta"
|
||||
"golang.org/x/tools/internal/imports"
|
||||
)
|
||||
|
||||
const src = `// Copyright 2021 The Go Authors. All rights reserved.
|
||||
|
|
|
@ -10,10 +10,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"golang.org/x/tools/gopls/internal/lsp/protocol"
|
||||
"golang.org/x/tools/internal/event"
|
||||
"golang.org/x/tools/internal/gocommand"
|
||||
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
|
||||
"golang.org/x/tools/gopls/internal/lsp/protocol"
|
||||
)
|
||||
|
||||
func GoEnvMiddleware() (Middleware, error) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче