FG42/john_titor/src/john_titor/commands/echo.cljs

12 lines
257 B
Clojure

(ns john-titor.commands.echo
(:require
[john-titor.commands.protocols :as proto :refer [defcommand]]))
(defn- echo [msg]
(str msg "/" msg))
(deftype EchoCommand []
proto/CommandRouter
(init [_ server]
(defcommand server "echo" #(echo %))))