Is there any library available which measures cognitive complexity of function written in "Go"?

I need to measure the cognitive complexity of all the function of my project which is written in Go. I’m looking for any library or tools which could help me in this regard.


A method-level rule is available from SonarGo. It will raise issues for methods with a complexity higher than the allowed threshold. It also calculates metrics at file level and above.