tartrazine/data
Luke Francl eb043e80a8 Add GetLanguageID function
The Linguist-defined language IDs are important to our use case because they are
used as database identifiers. This adds a new generator to extract the language
IDs into a map and uses that to implement GetLanguageID.

Because one language has the ID 0, there is no way to tell if a language name is
found or not. If desired, we could add this by returning (string, bool) from
GetLanguageID. But none of the other functions that take language names do this,
so I didn't want to introduce it here.
2021-04-13 11:49:21 -07:00
..
rule Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00
alias.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
colors.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
commit.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
content.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
doc.go Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00
documentation.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
extension.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
filename.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
frequencies.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
generated_test.go data: fix getting the first line for empty content 2020-05-28 11:28:49 +02:00
generated.go data: bailout in some cases if there arent enough lines 2020-05-28 13:39:59 +02:00
groups.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
heuristics_test.go *: module rename to go-enry/go-enry/v4 2020-03-19 17:31:29 +01:00
heuristics.go *: module rename to go-enry/go-enry/v4 2020-03-19 17:31:29 +01:00
id.go Add GetLanguageID function 2021-04-13 11:49:21 -07:00
interpreter.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
mimeType.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
test.go data: replace substring package with regex package 2020-04-15 17:27:48 +02:00
type.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
vendor.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00