package
0.0.0-20241020204346-852d83918761
Repository: https://github.com/plutov/practice-go.git
Documentation: pkg.go.dev

# README

Function Frequency

Given a valid Go code in gocode.txt file find top-3 used functions. Don't count function declaration. This is a static analysis: the question is not how often each function is actually executed at runtime, but how often it is used by the programmer.

Function format: FunctionFrequency(gocode []byte) []string

Run tests with benchmarks

go test -bench .

# Functions

FunctionFrequency returns the top 3 most mentioned functions in the code sample.
FunctionFrequencyFSM returns the top 3 most mentioned functions in the code sample.

# Structs

Call is a count of a function call.

# Type aliases

CallList is a list of call counts, sortable on count.