go: Add ability to run testable examples (#39390)
See related discussion #39381. <img width="724" height="488" src="https://github.com/user-attachments/assets/4a69e13e-783f-45d7-99f4-e23c0415a781" /> Release Notes: - Added ability to run Go Testable Examples
This commit is contained in:
@@ -71,6 +71,15 @@
|
||||
(#set! tag go-subtest)
|
||||
)
|
||||
|
||||
; Functions names start with `Example`
|
||||
(
|
||||
(
|
||||
(function_declaration name: (_) @run @_name
|
||||
(#match? @_name "^Example.*"))
|
||||
) @_
|
||||
(#set! tag go-example)
|
||||
)
|
||||
|
||||
; Functions names start with `Benchmark`
|
||||
(
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user