Skip to content

Latest commit

Β 

History

History
48 lines (38 loc) Β· 1.77 KB

File metadata and controls

48 lines (38 loc) Β· 1.77 KB

statloc core

✏️ About

  • Go package for collecting project statistic (lines of code, methods, files, components, etc.)
  • Core package for @statloc
  • Used both by server and CLI

⚑ Installation

go get github.com/statloc/core

πŸ“ Sample usage

package 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)
}

🀝 Contributing

Follow our guide to contribute to this project