2018-11-13 09:13:53 -07:00
|
|
|
// +build go1.11
|
|
|
|
|
|
|
|
package bar
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/tools/internal/lsp/foo" //@item(foo, "foo", "\"golang.org/x/tools/internal/lsp/foo\"", "package")
|
|
|
|
)
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
func helper(i foo.IntFoo) {} //@item(helper, "helper", "func(i foo.IntFoo)", "func")
|
2018-11-20 16:18:33 -07:00
|
|
|
|
2018-11-13 09:13:53 -07:00
|
|
|
func _() {
|
2018-11-20 16:18:33 -07:00
|
|
|
help //@complete("l", helper)
|
2019-09-13 13:15:53 -06:00
|
|
|
_ = foo.StructFoo{} //@complete("S", IntFoo, StructFoo, Foo)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
|
2019-08-06 16:51:17 -06:00
|
|
|
// Bar is a function.
|
|
|
|
func Bar() { //@item(Bar, "Bar", "func()", "func", "Bar is a function.")
|
2018-11-13 09:13:53 -07:00
|
|
|
foo.Foo() //@complete("F", Foo, IntFoo, StructFoo)
|
|
|
|
var _ foo.IntFoo //@complete("I", Foo, IntFoo, StructFoo)
|
|
|
|
foo.() //@complete("(", Foo, IntFoo, StructFoo)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
var Valentine int //@item(Valentine, "Valentine", "int", "var")
|
|
|
|
|
|
|
|
_ = foo.StructFoo{
|
2019-05-13 15:37:08 -06:00
|
|
|
Valu //@complete(" //", Value)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
2019-05-13 15:37:08 -06:00
|
|
|
Va //@complete("a", Value, Valentine)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
|
|
|
Value: 5, //@complete("a", Value)
|
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
2019-05-13 15:37:08 -06:00
|
|
|
//@complete("", Value, Valentine, foo, Bar, helper)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
|
|
|
Value: Valen //@complete("le", Valentine)
|
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
2019-04-23 16:34:23 -06:00
|
|
|
Value: //@complete(" //", Valentine, foo, Bar, helper)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
_ = foo.StructFoo{
|
2018-11-20 16:18:33 -07:00
|
|
|
Value: //@complete(" ", Valentine, foo, Bar, helper)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
2019-04-23 16:34:23 -06:00
|
|
|
}
|