From 2d215131f292b5d52554d0a96783226114c8725c Mon Sep 17 00:00:00 2001 From: Greg Rynkowski <5878299+rynkowsg@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:53:19 -0300 Subject: [PATCH] Correct README example regarding :error-fn (#88) The indentation of :error-fn seemes to be misaligned. This commit corrects it. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6813568..5ef9a3a 100644 --- a/README.md +++ b/README.md @@ -100,16 +100,16 @@ Here is an example script to get you started! :validate dir-exists?} ; tests if --dir exists :flag {:coerce :boolean ; defines a boolean flag :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) - (case cause - :require - (println - (format "Missing required argument: %s\n" option)) - :validate - (println - (format "%s does not exist!\n" msg))))) + :error-fn ; a function to handle errors + (fn [{:keys [spec type cause msg option] :as data}] + (if (= :org.babashka/cli type) + (case cause + :require + (println + (format "Missing required argument: %s\n" option)) + :validate + (println + (format "%s does not exist!\n" msg))))) }) (defn -main