- Guard aginst non-existing syn highlighter file

- Create mod file in `examples` dir
This commit is contained in:
Jesse Portnoy
2023-07-16 02:12:12 +01:00
parent 291680feac
commit 5fa7eb841e
4 changed files with 42 additions and 3 deletions
+5 -1
View File
@@ -19,7 +19,11 @@ func main() {
var defs []*highlight.Def
gopath := os.Getenv("GOPATH")
files, _ := ioutil.ReadDir(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
files, lerr := ioutil.ReadDir(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
if lerr != nil {
fmt.Println(lerr)
return
}
for _, f := range files {
if strings.HasSuffix(f.Name(), ".yaml") {