Documentation ¶
Overview ¶
Package rule contains rule-based heuristic implementations. It is used in the generated code in content.go for disambiguation of languages with colliding extensions, based on regexps from Linguist data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchingLanguages ¶
func MatchingLanguages(langs ...string) languages
MatchingLanguages is a helper to create new languages.
Types ¶
type Heuristic ¶
Heuristic consist of (a number of) rules where each, if matches, identifies content as belonging to a programming language(s).
func Always ¶
func Always(l languages) Heuristic
Always rule always matches. Often is used as a default fallback.
Click to show internal directories.
Click to hide internal directories.