mirror of
https://github.com/golang/go
synced 2024-11-19 07:04:43 -07:00
330b9f1384
Building unimported completions requires re-parsing and formatting at least some of the file for each one, which adds up. Limit it to 20; I expect people will just type more rather than scroll through a giant list. Updates golang/go#36001. Change-Id: Ib41232b91c327d4b824e6176e30306abf356f5b4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/210198 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
20 lines
1.0 KiB
Go
20 lines
1.0 KiB
Go
package unimported
|
|
|
|
func _() {
|
|
//@unimported("", hashslashadler32, goslashast, encodingslashbase64, bytes)
|
|
pkg //@unimported("g", externalpackage)
|
|
// container/ring is extremely unlikely to be imported by anything, so shouldn't have type information.
|
|
ring.Ring //@unimported("Ring", ringring)
|
|
signature.Foo //@unimported("Foo", signaturefoo)
|
|
}
|
|
|
|
// Create markers for unimported std lib packages. Only for use by this test.
|
|
/* adler32 */ //@item(hashslashadler32, "adler32", "\"hash/adler32\"", "package")
|
|
/* ast */ //@item(goslashast, "ast", "\"go/ast\"", "package")
|
|
/* base64 */ //@item(encodingslashbase64, "base64", "\"encoding/base64\"", "package")
|
|
/* bytes */ //@item(bytes, "bytes", "\"bytes\"", "package")
|
|
/* pkg */ //@item(externalpackage, "pkg", "\"example.com/extramodule/pkg\"", "package")
|
|
|
|
/* ring.Ring */ //@item(ringring, "Ring", "(from \"container/ring\")", "var")
|
|
|
|
/* signature.Foo */ //@item(signaturefoo, "Foo", "func(a string, b int) (c bool) (from \"golang.org/x/tools/internal/lsp/signature\")", "func")
|