Registry / utility / fzipp-gocyclo

fzipp-gocyclo

JSON →
library0.6.0gogounverified

Package gocyclo calculates the cyclomatic complexities of functions and methods in Go source code.

go get github.com/fzipp/gocyclo
INSTALL
IMPORT
SIG · FZIPP-GOCYCLO
F
fzipp-gocyclo
utilitygov0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gocyclo
github.com/fzipp/gocyclo

Analyze cyclomatic complexity of a Go file.

package main import ( "fmt" "go/parser" "go/token" "github.com/fzipp/gocyclo" ) func main() { fset := token.NewFileSet() f, _ := parser.ParseFile(fset, "example.go", nil, 0) stats := gocyclo.Analyze(fset, []*token.File{f}) for _, s := range stats { fmt.Printf("%s: %d\n", s.Name, s.Complexity) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fzipp-gocyclo — go get fzipp-gocyclo · libregistry