From 2b2404ae6384a69a8581c594c5412be8ffc6d4a1 Mon Sep 17 00:00:00 2001 From: Andrea Crotti Date: Thu, 17 Oct 2024 15:05:21 +0100 Subject: [PATCH] use a when instead of if in example (#105) --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b4da54..c647b8a 100644 --- a/README.md +++ b/README.md @@ -102,15 +102,14 @@ Here is an example script to get you started! :desc "I am just a flag"}} :error-fn ; a function to handle errors (fn [{:keys [spec type cause msg option] :as data}] - (if (= :org.babashka/cli type) + (when (= :org.babashka/cli type) (case cause :require (println (format "Missing required argument: %s\n" option)) :validate (println - (format "%s does not exist!\n" msg))))) - }) + (format "%s does not exist!\n" msg)))))}) (defn -main [args]