mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-27 06:42:04 -03:00
doc: reformat & clarify
This commit is contained in:
@ -124,7 +124,9 @@ func (r always) Match(data []byte) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// checks if regular expression syntax isn't accepted by RE2 engine
|
// Checks if a regex syntax isn't accepted by RE2 engine.
|
||||||
|
// It's nil by construction from regex.MustCompileRuby but
|
||||||
|
// is used here as a Matcher interface wich itself is non-nil.
|
||||||
func runOnRE2AndRegexNotAccepted(re Matcher) bool {
|
func runOnRE2AndRegexNotAccepted(re Matcher) bool {
|
||||||
v, ok := re.(regex.EnryRegexp)
|
v, ok := re.(regex.EnryRegexp)
|
||||||
return ok && v == nil
|
return ok && v == nil
|
||||||
|
14
enry.go
14
enry.go
@ -1,15 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
Package enry implements multiple strategies for programming language identification.
|
Package enry identifies programming languages.
|
||||||
|
|
||||||
Identification is made based on file name and file content using a service
|
Identification is based on file name and content using a series
|
||||||
of strategies to narrow down possible option.
|
of strategies to narrow down possible options.
|
||||||
Each strategy is available as a separate API call, as well as a main enty point
|
Each strategy is available as a separate API call, as well as though the main enty point:
|
||||||
|
|
||||||
GetLanguage(filename string, content []byte) (language string)
|
GetLanguage(filename string, content []byte) (language string)
|
||||||
|
|
||||||
It is a port of the https://github.com/github/linguist from Ruby.
|
It is a port of the https://github.com/github/linguist from Ruby.
|
||||||
Upstream Linguist YAML files are used to generate datastructures for data
|
Upstream Linguist YAML files are used to generate datastructures for data
|
||||||
package.
|
package.
|
||||||
*/
|
*/
|
||||||
package enry // import "github.com/go-enry/go-enry/v2"
|
package enry // import "github.com/go-enry/go-enry/v2"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user