mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-29 21:36:27 -04:00
Fix syncat example
This commit is contained in:
+2
-3
@@ -11,15 +11,14 @@ import (
|
||||
"github.com/zyedidia/highlight"
|
||||
)
|
||||
|
||||
var defs []*highlight.Def
|
||||
|
||||
func main() {
|
||||
var defs []*highlight.Def
|
||||
gopath := os.Getenv("GOPATH")
|
||||
files, _ := ioutil.ReadDir(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
|
||||
|
||||
for _, f := range files {
|
||||
if strings.HasSuffix(f.Name(), ".yaml") {
|
||||
input, _ := ioutil.ReadFile(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
|
||||
input, _ := ioutil.ReadFile(gopath + "/src/github.com/zyedidia/highlight/syntax_files/" + f.Name())
|
||||
d, err := highlight.ParseDef(input)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user