prologue
prologue copied to clipboard
update examples
update examples like gin web framework
Is it better if I make a separate repo on my side for examples during developing so I wont have to bother with pull requests until I'm done?
that would mean that all examples will assume that prologue is installed globally
I think you counld use runableExamples for simple examples. runnableExamples will be checked.
You could create a seperate repo in planety organization and rely on global prologue installation.
What did you mean by runableExamples
? I'm kinda missed it.
I suggest I create some repo on my side like prologue-examples
and will gradually fill it with examples (I will do it at my free time). When I finish I can add them to my fork of prologue and will create a pull request to merge.
You could create a seperate repo in planety organization.
Ok great then!
You could ref to this document https://nim-lang.github.io/Nim/docgen.html Generally, you can write an example file with rst comments like
# example1.nim
## Using GET, POST, PUT, PATCH, DELETE and OPTIONS
## -----------------
runnableExamples:
proc hello(ctx: Context) {.async.} = discard
doAssert ................
## Parameters in path
## -----------------------
runnableExamples:
proc hello(ctx: Context) {.async.} = discard
doAssert ................
runnableExamples
docs in https://nim-lang.org/docs/system.html#runnableExamples%2Cuntyped
OK, noted, will take a look, thanks!