Skip to content

Instantly share code, notes, and snippets.

@christianromney
Created October 22, 2015 17:55
Show Gist options
  • Save christianromney/229bcee58a1b8390482f to your computer and use it in GitHub Desktop.
Save christianromney/229bcee58a1b8390482f 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