debugger: Add support for running test methods with function receiver in Go (#34613)

![CleanShot 2025-07-17 at 16 35
10](https://github.com/user-attachments/assets/bad794fb-198e-40a1-958c-6ff30a0a4e53)


Closes #33759

Release Notes:

- debugger: Add support for running test methods with function receiver
in Go

Signed-off-by: Umesh Yadav <git@umesh.dev>
This commit is contained in:
Umesh Yadav 2025-07-17 21:14:40 +05:30 committed by GitHub
parent b94649ce1e
commit b4dc7f8a8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,21 @@
; Functions names start with `Test` ; Functions names start with `Test`
( (
( [
(function_declaration name: (_) @run (function_declaration name: (_) @run
(#match? @run "^Test.*")) (#match? @run "^Test.*"))
) @_ (method_declaration
receiver: (parameter_list
(parameter_declaration
name: (identifier) @_receiver_name
type: [
(pointer_type (type_identifier) @_receiver_type)
(type_identifier) @_receiver_type
]
)
)
name: (field_identifier) @run @_method_name
(#match? @_method_name "^Test.*"))
] @_
(#set! tag go-test) (#set! tag go-test)
) )