mirror of
https://github.com/golang/go
synced 2024-11-19 03:54:42 -07:00
0522b6e926
Change-Id: Ia287d84186bccca9e74050528daf809cb0e88c46 Reviewed-on: https://go-review.googlesource.com/c/tools/+/176117 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
20 lines
613 B
Go
20 lines
613 B
Go
package good //@diag("package", "", "")
|
|
|
|
import (
|
|
"golang.org/x/tools/internal/lsp/types" //@item(types_import, "types", "\"golang.org/x/tools/internal/lsp/types\"", "package")
|
|
)
|
|
|
|
func random() int { //@item(good_random, "random()", "int", "func")
|
|
y := 6 + 7
|
|
return y
|
|
}
|
|
|
|
func random2(y int) int { //@item(good_random2, "random2(y int)", "int", "func"),item(good_y_param, "y", "int", "parameter")
|
|
//@complete("", good_y_param, types_import, good_random, good_random2, good_stuff)
|
|
var b types.Bob = &types.X{}
|
|
if _, ok := b.(*types.X); ok { //@complete("X", Bob_interface, X_struct, Y_struct)
|
|
}
|
|
|
|
return y
|
|
}
|