aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/inlay_hint/composite_literals.go')
-rw-r--r--gopls/internal/lsp/testdata/inlay_hint/composite_literals.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go b/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go
new file mode 100644
index 000000000..b05c95ec8
--- /dev/null
+++ b/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go
@@ -0,0 +1,27 @@
+package inlayHint //@inlayHint("package")
+
+import "fmt"
+
+func fieldNames() {
+ for _, c := range []struct {
+ in, want string
+ }{
+ struct{ in, want string }{"Hello, world", "dlrow ,olleH"},
+ {"Hello, 世界", "界世 ,olleH"},
+ {"", ""},
+ } {
+ fmt.Println(c.in == c.want)
+ }
+}
+
+func fieldNamesPointers() {
+ for _, c := range []*struct {
+ in, want string
+ }{
+ &struct{ in, want string }{"Hello, world", "dlrow ,olleH"},
+ {"Hello, 世界", "界世 ,olleH"},
+ {"", ""},
+ } {
+ fmt.Println(c.in == c.want)
+ }
+}