- Go package for collecting project statistic (lines of code, methods, files, components, etc.)
- Core package for @statloc
- Used both by server and CLI
go get github.com/statloc/corepackage main
import (
"github.com/statloc/core"
"fmt"
)
func main() {
stats := core.GetStatistics("/path/to/project")
result := = fmt.Sprintf(
`Statistics(total):
lines of code: %d
files: %d`,
stats.Total.LOC,
stats.Total.Files,
)
fmt.Println(results)
}Follow our guide to contribute to this project