tartrazine/internal/code-generator/generator
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
..
test_files Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
aliases.go Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00
colors.go Return group color if language has none 2020-03-31 09:30:27 +03:00
documentation.go Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00
extensions.go write a canonical header for machine-generated files 2018-04-30 12:57:39 +03:00
filenames.go write a canonical header for machine-generated files 2018-04-30 12:57:39 +03:00
frequencies.go generator: skip symlinks on *nix and win 2020-03-29 23:23:56 +02:00
generator_test.go Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
generator.go sync to the latest github/linguist v7.9.0 2020-03-30 01:25:57 +03:00
groups.go Return group color if language has none 2020-03-31 09:30:27 +03:00
heuristics_test.go sync to the latest github/linguist v7.9.0 2020-03-30 01:25:57 +03:00
heuristics.go sync to the latest github/linguist v7.11.0 2020-09-17 10:34:41 +03:00
id.go Add GetLanguageID function 2021-04-13 11:49:21 -07:00
interpreters.go write a canonical header for machine-generated files 2018-04-30 12:57:39 +03:00
langinfo.go Add GetLanguageID function 2021-04-13 11:49:21 -07:00
linguist-commit.go write a canonical header for machine-generated files 2018-04-30 12:57:39 +03:00
mimeType.go Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00
types.go write a canonical header for machine-generated files 2018-04-30 12:57:39 +03:00
vendor.go Sync to linguist 7.2.0: heuristics.yml support (#189) 2019-02-14 12:47:45 +01:00