mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
When a user completes rand.<>, propose rand.Seed (from math/rand) and rand.Prime (from crypto/rand), etc. Because we don't necessarily have type checking information for unimported packages, I had to add shortcut cases to a number of functions around the completion code. Better suggestions welcome. Change-Id: I7822dc75c86b24156963e7bdd959443f4f2748b1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/204819 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Muir Manders <muir@mnd.rs>
16 lines
725 B
Go
16 lines
725 B
Go
package unimported
|
|
|
|
func _() {
|
|
//@unimported("", bytes, context, cryptoslashrand, time, unsafe, externalpackage)
|
|
bytes. //@unimported(" /", bytesbuffer)
|
|
}
|
|
|
|
// Create markers for unimported std lib packages. Only for use by this test.
|
|
/* bytes */ //@item(bytes, "bytes", "\"bytes\"", "package")
|
|
/* context */ //@item(context, "context", "\"context\"", "package")
|
|
/* rand */ //@item(cryptoslashrand, "rand", "\"crypto/rand\"", "package")
|
|
/* time */ //@item(time, "time", "\"time\"", "package")
|
|
/* unsafe */ //@item(unsafe, "unsafe", "\"unsafe\"", "package")
|
|
/* pkg */ //@item(externalpackage, "pkg", "\"example.com/extramodule/pkg\"", "package" )
|
|
|
|
/* bytes.Buffer */ //@item(bytesbuffer, "Buffer", "(from \"bytes\")", "var" ) |