juxt / clip

Light structure and support for dependency injection
MIT License
228 stars 15 forks source link

readme/docs to demo how to use non-read system datastructure #6

Closed henryw374 closed 4 years ago

henryw374 commented 4 years ago

In the readme is a def'd system (as opposed to edn-string-read/slurped system), which I think needs to include unquote around the ref bits, otherwise the fns get passed the form, rather than the actual ref.

:handler {:start `(find-seed-resource ~(clip/ref :db))} ;; (4)
:http {:start `(yada/listener ~(clip/ref :handler))
           :stop '((:close this)) ;; (5)

More demo of how to use this in stop would be a help too. when referring to a stopping var, I had something like this for example: (list my-stop-fn 'this )

SevereOverfl0w commented 4 years ago

The form should work as well. Readme is as I desired, will check example works.

SevereOverfl0w commented 4 years ago

Fixed that form not being caught, and released as 0.15.0