linguist

package
v16.6.8 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 18 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.

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, logger log.Logger, 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 git.ObjectID) (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