Closed kenrestivo closed 7 years ago
Very good addition :+1:
agree, thanks!
@tolitius Can an example usage of docstring be shown in the project README? Otherwise people won't know they can add docstring.
==== Oh sorry I thought this PR means I can add docstring for a state until I read the code.. Is there anyway to add docstring?...
dev=> (doc mount/defstate)
-------------------------
mount.core/defstate
([state & body])
Macro
Defines a state. Restarts on recompilation.
Pass ^{:on-reload :noop} to prevent auto-restart
on ns recompilation, or :stop to stop on recompilation.
dev=> (defstate answer
"answer to the ultimate question of life universe and everything"
:start (+ 1 41))
#'dev/answer
dev=> (mount/start #'dev/answer)
{:started ["#'dev/answer"]}
dev=> answer
42
dev=> (doc answer)
-------------------------
dev/answer
answer to the ultimate question of life universe and everything
you mean something like this?
Exactly. Thanks!!
I keep forgetting the syntax for this. Rather than having to go diving for the README all the time, would be good to have this vital information. in the docstring.