redis: add autodocs
This commit is contained in:
@@ -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)))
|
||||
|
Reference in New Issue
Block a user