Improve api

This commit is contained in:
Zachary Yedidia
2017-02-18 21:29:17 -05:00
parent 0f7ed208c1
commit 6dfc8e081f
5 changed files with 37 additions and 9 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ var defs []*highlight.Def
...
def := highlight.DetectFiletype(defs, filename, firstLine)
fmt.Println("Filetype is", def.ft)
fmt.Println("Filetype is", def.FileType)
```
For a full example, see the [`syncat`](./examples) example which acts like cat but will syntax highlight the output (if highlight recognizes the filetype).