| package arraytype |
| |
| import ( |
| "golang.org/x/tools/internal/lsp/foo" |
| ) |
| |
| func _() { |
| var ( |
| val string //@item(atVal, "val", "string", "var") |
| ) |
| |
| [] //@complete(" //", PackageFoo) |
| |
| []val //@complete(" //") |
| |
| []foo.StructFoo //@complete(" //", StructFoo) |
| |
| []foo.StructFoo(nil) //@complete("(", StructFoo) |
| |
| []*foo.StructFoo //@complete(" //", StructFoo) |
| |
| [...]foo.StructFoo //@complete(" //", StructFoo) |
| |
| [2][][4]foo.StructFoo //@complete(" //", StructFoo) |
| |
| []struct { f []foo.StructFoo } //@complete(" }", StructFoo) |
| } |
| |
| func _() { |
| type myInt int //@item(atMyInt, "myInt", "int", "type") |
| |
| var mark []myInt //@item(atMark, "mark", "[]myInt", "var") |
| |
| var s []myInt //@item(atS, "s", "[]myInt", "var") |
| s = []m //@complete(" //", atMyInt) |
| s = [] //@complete(" //", atMyInt, PackageFoo) |
| |
| var a [1]myInt |
| a = [1]m //@complete(" //", atMyInt) |
| |
| var ds [][]myInt |
| ds = [][]m //@complete(" //", atMyInt) |
| } |
| |
| func _() { |
| var b [0]byte //@item(atByte, "b", "[0]byte", "var") |
| var _ []byte = b //@snippet(" //", atByte, "b[:]", "b[:]") |
| } |