buildAll(false)
} else if len(args) == 1 {
if err := build(args[0], os.Stdout, globals()); err != nil {
- fmt.Println("ERROR: " + err.Error())
+ log.Fatal("ERROR: " + err.Error())
}
} else {
- fmt.Println("ERROR: too many arguments")
+ log.Fatal("ERROR: too many arguments")
}
case "clean":
- fmt.Println("Removing generated site directory")
+ log.Println("Removing generated site directory")
os.RemoveAll(PUBDIR)
case "serve":
servePubDir()
case "var":
if len(args) == 0 {
- fmt.Println("var: filename expected")
+ log.Fatal("var: filename expected")
} else {
s := ""
if vars, _, err := getVars(args[0], Vars{}); err != nil {
buildAll(true)
default:
if s, err := run(globals(), cmd, args...); err != nil {
- fmt.Println(err)
+ log.Println(err)
} else {
- fmt.Println(s)
+ log.Println(s)
}
}
}