我有ORA-22813
,并希望以-m 4 -y 2016
或地图结尾。如何将它们分成几对?
答案 0 :(得分:2)
答案 1 :(得分:2)
(let [cli-options [["-m" "--max MAX" "M description"
:parse-fn #(Integer/parseInt %)]
["-y" "--year YEAR" "Year"
:parse-fn #(Integer/parseInt %)]]]
(-> "-m 4 -y 2016"
(str/split #"\s")
(parse-opts cli-options)))
=>
{:options {:max 4, :year 2016},
:arguments [],
:summary " -m, --max MAX M description\n-y, --year YEAR Year",
:errors nil}