Skip to content

Commit

Permalink
use a when instead of if in example (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaCrotti authored Oct 17, 2024
1 parent de2569f commit 2b2404a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2b2404a

Please sign in to comment.