mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-09-18 19:28:12 +00:00
Add API usage example
This commit is contained in:
@@ -28,13 +28,16 @@ fmt.Println(lang)
|
|||||||
lang, _ = GetLanguageByContent("bar.m", "<pbjective-c-code>")
|
lang, _ = GetLanguageByContent("bar.m", "<pbjective-c-code>")
|
||||||
fmt.Println(lang)
|
fmt.Println(lang)
|
||||||
// result: Objective-C
|
// result: Objective-C
|
||||||
|
|
||||||
|
// all strategies together
|
||||||
|
lang := enry.GetLanguage("foo.cpp", "<cpp-code>")
|
||||||
```
|
```
|
||||||
|
|
||||||
Developmemt
|
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
|
*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
|
To run the tests
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user