Open nidu opened 8 years ago
Hi Nikolay,
As you're doing now is fine. Otherwise, if you prefer you can use:
(require '[taoensso.encore :as encore :refer [merge-keywords]])
(merge-keywords [:a :b :c :d]) ; => :a.b.c/d
Tower uses encore, so you'll already have this dependency loaded. Does that help?
Peter, thanks, that's just what i need! Probably it would be nice to mention this approach in readme since making dynamic paths is a common task (as for me) and encore is already shipped.
Hello,
Excuse me, but it's not clear to me how can i quickly make dynamic paths, could you please show some example?
For example i have resource lie
{:a {:b {:c "Hello"} :d {:c "world"}}
. I'd like extract path for eitherb
ord
giving this key as an argument. It would be nice to do something like(t :en :a variable :c)
instead of(keyword (str "a/" (name variable) "/c"))
.Thanks in advance.