From 1a97fc1b030444a4b1a9fa2d8cb12db860166fe0 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 26 Mar 2017 20:10:57 -0400 Subject: [PATCH] Small update to syncat --- examples/syncat.go | 5 +++++ 1 file changed, 5 insertions(+) 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")