linguist

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language struct {
	Language string  `json:"language"`
	Percent  float64 `json:"percent"`
	// Color represents the color associated with the language in HTML hex notation.
	Color string `json:"color"`
}

Language is the programming langage and the percentage on how sure linguist feels about its decision.

func Alias added in v0.7.0

func Alias(lang *Language) *Language

Alias returns the language name for a given known alias.

Occasionally linguist comes up with odd language names, or determines a Java app as a "Maven POM" app, which in essence is the same thing for Draft's intent.

func ProcessDir

func ProcessDir(dirname string) ([]*Language, error)

ProcessDir walks through a directory and returns a list of sorted languages within that directory.

Jump to

Keyboard shortcuts

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