sorter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSorter

type FileSorter struct {
	// contains filtered or unexported fields
}

func NewFileSorter

func NewFileSorter(sortOrder string) FileSorter

func (FileSorter) OrderByBlankLines

func (f FileSorter) OrderByBlankLines(summary *scanner.Summary) *SortedSummary

func (FileSorter) OrderByCodeLines

func (f FileSorter) OrderByCodeLines(summary *scanner.Summary) *SortedSummary

func (FileSorter) OrderByComments

func (f FileSorter) OrderByComments(summary *scanner.Summary) *SortedSummary

func (FileSorter) OrderByLanguage

func (f FileSorter) OrderByLanguage(summary *scanner.Summary) *SortedSummary

func (FileSorter) OrderByLines

func (f FileSorter) OrderByLines(summary *scanner.Summary) *SortedSummary

type LanguageSorter

type LanguageSorter struct {
	// contains filtered or unexported fields
}

func NewLanguageSorter

func NewLanguageSorter(sortOrder string) LanguageSorter

func (LanguageSorter) OrderByBlankLines

func (l LanguageSorter) OrderByBlankLines(summary *scanner.Summary) *SortedSummary

func (LanguageSorter) OrderByCodeLines

func (l LanguageSorter) OrderByCodeLines(summary *scanner.Summary) *SortedSummary

func (LanguageSorter) OrderByComments

func (l LanguageSorter) OrderByComments(summary *scanner.Summary) *SortedSummary

func (LanguageSorter) OrderByFiles

func (l LanguageSorter) OrderByFiles(summary *scanner.Summary) *SortedSummary

func (LanguageSorter) OrderByLanguage

func (l LanguageSorter) OrderByLanguage(summary *scanner.Summary) *SortedSummary

func (LanguageSorter) OrderByLines

func (l LanguageSorter) OrderByLines(summary *scanner.Summary) *SortedSummary

type Result

type Result struct {
	Name       string
	Lines      int
	CodeLines  int
	BlankLines int
	Comments   int
}

type SortedSummary

type SortedSummary struct {
	Results         []Result
	FilesByLanguage map[string]int
	TotalFiles      int
	TotalLines      int
	TotalCodeLines  int
	TotalBlankLines int
	TotalComments   int
}

type Sorter

type Sorter interface {
	OrderByLanguage(summary *scanner.Summary) *SortedSummary
	OrderByCodeLines(summary *scanner.Summary) *SortedSummary
	OrderByLines(summary *scanner.Summary) *SortedSummary
	OrderByComments(summary *scanner.Summary) *SortedSummary
	OrderByBlankLines(summary *scanner.Summary) *SortedSummary
}

Jump to

Keyboard shortcuts

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