Skip to content

Commit 12a90c9

Browse files
author
anatoly32322
committed
Add go with anonymous function case in gstack
1 parent 72000e0 commit 12a90c9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* Added `Struct` support for `Variant` in `ydb.ParamsBuilder()`
2+
* Added `go` with anonymous function case in `gstack`
23

34
## v3.61.2
45
* Changed default transaction control to `NoTx` for execute query through query service client

internal/cmd/gstack/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ func getCallExpressionsFromStmt(statement ast.Stmt) (listOfCallExpressions []*as
7979
body = stmt.Body
8080
case *ast.ForStmt:
8181
body = stmt.Body
82+
case *ast.GoStmt:
83+
if fun, ok := stmt.Call.Fun.(*ast.FuncLit); ok {
84+
listOfCallExpressions = append(listOfCallExpressions, getListOfCallExpressionsFromBlockStmt(fun.Body)...)
85+
} else {
86+
listOfCallExpressions = append(listOfCallExpressions, stmt.Call)
87+
}
8288
case *ast.RangeStmt:
8389
body = stmt.Body
8490
case *ast.DeclStmt:

0 commit comments

Comments
 (0)