linguist

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Color

func Color(language string) string

Color returns the color Linguist has assigned to language.

func LoadColors

func LoadColors(cfg config.Cfg) error

LoadColors loads the name->color map from the Linguist gem.

Types

type ByteCountPerLanguage added in v1.66.0

type ByteCountPerLanguage map[string]uint64

ByteCountPerLanguage represents a counter value (bytes) per language.

func Stats

func Stats(ctx context.Context, repoPath string, commitID string) (ByteCountPerLanguage, error)

Stats returns the repository's language stats as reported by 'git-linguist'.

type CountPerLanguage added in v1.66.0

type CountPerLanguage map[string]int

CountPerLanguage represents a counter value (int) per language.

func FileCountStats added in v1.66.0

func FileCountStats(ctx context.Context, repoPath string, commitID string) (CountPerLanguage, error)

FileCountStats returns the file counts per language

type FileListPerLanguage added in v1.66.0

type FileListPerLanguage map[string][]string

FileListPerLanguage is used to parse Linguist's breakdown output to represent the list of files per language.

type Language

type Language struct {
	Color string `json:"color"`
}

Language is used to parse Linguist's language.json file.

Jump to

Keyboard shortcuts

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