redis: add autodocs

This commit is contained in:
2020-02-09 23:45:49 +01:00
parent 307ea9d482
commit e58dcbe479

View File

@@ -139,6 +139,12 @@
(defmacro defredis [cmd :rest args]
(list 'defmodule 'Redis
(list 'doc cmd (String.join [
"is a wrapper around the `" (rtreat- (Symbol.str cmd)) "` Redis command.
It takes the same arguments as the [Redis command](https://redis.io/commands/"
(Symbol.str cmd) ")."
]))
(list 'defn cmd (cadr (collect-into (cons 'r args) array))
(list 'do
(list 'Redis.send 'r (list 'copy (rtreat- (Symbol.str cmd))) (list 'ref (rconv- args)))