我正在从0.2.2 迁移[org.clojure/tools.cli "0.1.0"]
到 0.2.2,但正在
Exception in thread "main" clojure.lang.ArityException:
Wrong number of args (2) passed to: PersistentVector
在以开头的行(cli args
(defn parse-opts
"Using the newer cli library, parses command line args."
[args]
(cli args
["--ifn1" ".csv input file" :default "benetrak_roster.csv"]
["--ifn2" ".csv input file" :default "billing_roster.csv"]
["--rpt" ".csv pipe delimited output file" :default "bene_gic_rpt.csv"]
["--dump1" "text file report for debug output" :default "dumpfile1.txt"]
["--dump2" "text file report for debug output" :default "dumpfile2.txt"]
["--debug" "Debug flag for logging." :default 0 :parse-fn #(Integer. %)]))
像这样包含 tools.cli (:use clojure.tools.cli)。
我看不出我做错了什么,并希望得到任何指示或帮助。谢谢。
顺便说一句,我通过查看示例尝试了以下方法,但它不起作用:
(defn -main
[& args]
(let [[opts args banner]
(cli args
["--ifn1" ".csv input file" :default "benetrak_roster.csv"]
["--ifn2" ".csv input file" :default "billing_roster.csv"]
["--rpt" ".csv pipe delimited output file" :default "bene_gic_rpt.csv"]
["--dump1" "text file report for debug output" :default "dumpfile1.txt"]
["--dump2" "text file report for debug output" :default "dumpfile2.txt"]
["--debug" "Debug flag for logging." :default 0 :parse-fn #(Integer. %)])
start-time (str (Date.))]
.
.
.