Skip to content

Commit

Permalink
Use implicit require-macros for go and go-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed May 1, 2024
1 parent 5574630 commit e03e56b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ Haslett provides a simple and idiomatic interface to using WebSockets:

```clojure
(ns example.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as a :refer [<! >!]]
(:require [cljs.core.async :as a :refer [<! >! go]]
[haslett.client :as ws]
[haslett.format :as fmt]))

Expand Down
5 changes: 2 additions & 3 deletions src/haslett/client.cljs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(ns haslett.client
"A namespace for opening WebSockets in ClojureScript."
(:require [cljs.core.async :as a :refer [<! >!]]
[haslett.format :as fmt])
(:require-macros [cljs.core.async.macros :refer [go-loop]]))
(:require [cljs.core.async :as a :refer [<! >! go-loop]]
[haslett.format :as fmt]))

(defn close
"Close a stream opened by connect."
Expand Down
5 changes: 2 additions & 3 deletions test/haslett/client_test.cljs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
(ns haslett.client-test
(:require [cljs.test :refer-macros [deftest is testing async]]
[cljs.core.async :as a :refer [<! >!]]
[cljs.core.async :as a :refer [<! >! go]]
[cljs.core.async.impl.protocols :as ap]
[haslett.client :as ws]
[haslett.format :as fmt])
(:require-macros [cljs.core.async.macros :refer [go]]))
[haslett.format :as fmt]))

(deftest test-defaults
(async done
Expand Down

0 comments on commit e03e56b

Please sign in to comment.