testcontainers/testcontainers-clj

using `:keys [......]`

zcaudate opened this issue · 3 comments

Thanks for the library.

I noticed that you are explicitly mapping out the variable names:

{image-name :image-name
 exposed-ports :exposed-ports
 env-vars :env-vars
 command :command}

I was curious to why you're doing that instead the shorter

{:keys [image-name exposed-ports env-vars command]}

Is that a stylistic or a readability thing?

Thanks for your suggestion! It was not a conscious decision, to be honest. I like the more concise notation of :keys. As it won't change anything for the API, I will add this change in the next release.

@javahippie haha.. yeah. usually the mapping is for renaming a keyed variable:

(let [{bid-id :id} bid-order
      {ask-id :id} ask-order]
   ....)

Anyways. Thanks heaps for the library. I didn't know about testcontainers till now. It rocks.

Reopening, so I can track it in the release ;)