Add API usage example

This commit is contained in:
Alexander Bezzubov 2017-06-21 09:07:55 +02:00
parent 1fee327e08
commit 81c101ce45

View File

@ -28,13 +28,16 @@ fmt.Println(lang)
lang, _ = GetLanguageByContent("bar.m", "<pbjective-c-code>")
fmt.Println(lang)
// result: Objective-C
// all strategies together
lang := enry.GetLanguage("foo.cpp", "<cpp-code>")
```
Developmemt
-----------
*enry* re-uses parts of original [linguist](https://github.com/github/linguist) especially data in `languages.yml` to generate internal datastructures. In oreder to update to latest upstream run
make clen code-generate
make clean code-generate
To run the tests