Skip to content

Instantly share code, notes, and snippets.

@ul
Forked from christianromney/immuconf.clj
Created October 23, 2015 03:27
Show Gist options
  • Save ul/9d8d55834e7e5fa6be83 to your computer and use it in GitHub Desktop.
Save ul/9d8d55834e7e5fa6be83 to your computer and use it in GitHub Desktop.
(defn config-files
"Returns a sequence of configuration files
that should be loaded by Immuconf."
([]
(config-files (env :environment)))
([current-env]
(let [converter (comp (map (partial str "config/"))
(map io/resource)
(remove nil?))
file-list (cond-> []
true (conj "base.edn" "strings.edn")
current-env (conj (str current-env ".edn"))
true (conj "user.edn"))]
(sequence converter file-list))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment