Fork me on GitHub
#duct
<
2021-08-03
>
rickmoynihan07:08:39

@richiardiandrea yes that should work. const is essentially just the identity function, so something like this:

(defmethod ig/init-key :duct/const [_ v] v)
it works by just returning the config value as the component

richiardiandrea14:08:31

Thanks yes, the trick there is that you need a namespaced key ...mine was not working because :foo does not have a namespace 😉

rickmoynihan07:08:53

Oh what you have probably won’t quite work… iirc you need to use two namespaced keys:

[:duct/const :myns/foo] true
myns can be anything you want.

👍 6