This document outlines the definition of file metrics for Go.
The "complexity" metric counts:
ifandelse ifstatementsforloops with following syntaxes:for <initStatement>; <condition>; <postStatement> {...}for <condition> {...}for <expressionList> = range <expression> {...}for <identifierList> := range <expression> {...}
caselabels in switch-statements and select-statements- logical binary operations
&&and|| - everything counted for the "functions" metric
The "functions" metric counts:
- function and method declarations in
structandinterfacewith and without the keywordfunc - general functions and function literals
The "classes" metric counts:
structandinterfacedeclarations (named and anonymous)
see README.md