New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to make dynamic paths #68
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 either
b
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.
The text was updated successfully, but these errors were encountered: