cloc

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLanguage

func GetLanguage(extension string) string

func IsComment

func IsComment(str string) bool

TODO: add support for multiline comments

func IsHiddenFile added in v0.0.4

func IsHiddenFile(filename string) (bool, error)

Types

type Cloc

type Cloc struct {
	LanguageResults map[string]Results // results grouped by language
	TotalFiles      int                // total amount of files
	TotalLines      int                // total amount of lines
	TotalCode       int                // total amount of lines of code
	TotalComment    int                // total amount of lines of comments
	TotalBlank      int                // total amount of blank lines
	Duration        time.Duration      // counntig duration
}

func (*Cloc) Do

func (c *Cloc) Do(path string) error

func (*Cloc) PrintResults

func (c *Cloc) PrintResults()

type Results

type Results struct {
	Files      int // amount of files
	TotalLines int // total amount of lines
	Code       int // amount of lines of code
	Comment    int // amount of lines of comments
	Blank      int // amount of blank lines
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL