Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GClocFile ¶
type GClocFile struct { Name string `xml:"name,attr" json:"name"` // Name of the file Language string `xml:"language,attr" json:"language"` // Language of the file Codes uint32 `xml:"codes,attr" json:"codes"` // Number of lines of code Comments uint32 `xml:"comments,attr" json:"comments"` // Number of lines of comments Blanks uint32 `xml:"blanks,attr" json:"blanks"` // Number of blank lines }
GClocFile represents a file with its lines of code, comments and blanks.
func AnalyzeFile ¶
func AnalyzeFile(filename string, language *language.Language, opts *option.GClocOptions) *GClocFile
AnalyzeFile analyzes a file and returns a GClocFile.
func AnalyzeReader ¶
type GClocFiles ¶
type GClocFiles []GClocFile
GClocFiles is a slice of GClocFile.
func (GClocFiles) SortByBlanks ¶
func (gf GClocFiles) SortByBlanks()
SortByBlanks sorts the files by number of blank lines. (DESC)
func (GClocFiles) SortByCodes ¶
func (gf GClocFiles) SortByCodes()
SortByCodes sorts the files by number of lines of code. (DESC)
func (GClocFiles) SortByComments ¶
func (gf GClocFiles) SortByComments()
SortByComments sorts the files by number of lines of comments. (DESC)
func (GClocFiles) SortByName ¶
func (gf GClocFiles) SortByName()
SortByName sorts the files by name. (ASC)
Click to show internal directories.
Click to hide internal directories.