Merge pull request #44 from jstepien/enumeration-seq
Simplify load-plugins with enumeration-seq
This commit is contained in:
commit
ca18cdf916
1 changed files with 2 additions and 4 deletions
|
@ -12,7 +12,5 @@
|
||||||
|
|
||||||
(defn load-plugins []
|
(defn load-plugins []
|
||||||
(let [plugins (.getResources (ClassLoader/getSystemClassLoader) "plugin.edn")]
|
(let [plugins (.getResources (ClassLoader/getSystemClassLoader) "plugin.edn")]
|
||||||
(loop []
|
(doseq [plugin (enumeration-seq plugins)]
|
||||||
(load-plugin (. ^java.net.URL (. plugins nextElement) openStream))
|
(load-plugin (. ^java.net.URL plugin openStream)))))
|
||||||
(when (.hasMoreElements plugins)
|
|
||||||
(recur)))))
|
|
||||||
|
|
Loading…
Reference in a new issue