linguist

package
v15.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Color added in v15.5.0

func Color(language string) string

Color returns the color Linguist has assigned to language.

Types

type ByteCountPerLanguage

type ByteCountPerLanguage map[string]uint64

ByteCountPerLanguage represents a counter value (bytes) per language.

type Instance

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

Instance is a holder of the defined in the system language settings.

func New

func New(cfg config.Cfg, catfileCache catfile.Cache, repo *localrepo.Repo) *Instance

New creates a new instance that can be used to calculate language stats for the given repo.

func (*Instance) Stats

func (inst *Instance) Stats(ctx context.Context, commitID string) (ByteCountPerLanguage, error)

Stats returns the repository's language statistics.

Jump to

Keyboard shortcuts

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