liquidz / dad

Small configuration management tool for Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expand var in string

liquidz opened this issue · comments

It is boring to wrap with str everytime.

(def src-dir "/usr/local/src")

::: boring
(git {:path (str src-dir "/vim")
      :url "https://github.com/vim/vim"})

::: best
(git {:path "{{src-dir}}/vim"
      :url "https://github.com/vim/vim"})

:: better
(git {:path (render "{{src-dir}}/vim" {:src-dir src-dir})
      :url "https://github.com/vim/vim"})

dad/render built-in function is provided.
closed by #10