From 37c0f5f3fc822a717af66f895e611bac84de059f Mon Sep 17 00:00:00 2001 From: Izuru Yakumo Date: Sat, 29 Apr 2023 01:42:07 -0300 Subject: [PATCH] Replace some fmt calls with log Signed-off-by: Izuru Yakumo --- cmd/aya/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/aya/main.go b/cmd/aya/main.go index c3152bc..15a3737 100644 --- a/cmd/aya/main.go +++ b/cmd/aya/main.go @@ -402,19 +402,19 @@ func main() { 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 { @@ -439,9 +439,9 @@ func main() { 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) } } } -- 2.43.0