diff --git a/examples/syncat.go b/examples/syncat.go index fffdf2f..c9a7c33 100644 --- a/examples/syncat.go +++ b/examples/syncat.go @@ -12,6 +12,11 @@ import ( ) func main() { + if len(os.Args) <= 1 { + fmt.Println("No input file") + return + } + var defs []*highlight.Def gopath := os.Getenv("GOPATH") files, _ := ioutil.ReadDir(gopath + "/src/github.com/zyedidia/highlight/syntax_files")