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

Hi,
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.

Hi,

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.

 
HTH,
Ann