Skip to content

[Go] DataFlow modeling for wrapped/argument functions #16718

Answered by smowton
rh-tguittet asked this question in Q&A
Discussion options

You must be logged in to vote

No, this doesn't work at the moment in Go. This scenario was successfully implemented a few months ago for Java, but we haven't had the time yet to port the solution to the Go QL library.

To work around the problem, you would need to use the isAdditionalFlowStep predicate of MyFlowImpl to implement logic such as, for a call to wrapExecWithRetry, anything that flows to a return node of its argument also flows to the callsite of wrapExecWithRetry -- or, to make that more general, replace wrapExecWithRetry with any function with a lambda parameter where the return value of that lambda is itself returned.

If you are still struggling to get this to do what you want, post your implementation of i…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rh-tguittet
Comment options

Answer selected by rh-tguittet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants