summaryrefslogtreecommitdiffstats
path: root/matterhook
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-07-14 00:35:01 +0200
committerWim <wim@42.be>2017-07-14 00:35:01 +0200
commit6dee988b76852c6b15ef59061896ce48ce6ba978 (patch)
treeb2a187be4850e212400bb9627e60327c63370b30 /matterhook
parent5af40db3965649348143a530bea671574fb1ef54 (diff)
downloadmatterbridge-msglm-6dee988b76852c6b15ef59061896ce48ce6ba978.tar.gz
matterbridge-msglm-6dee988b76852c6b15ef59061896ce48ce6ba978.tar.bz2
matterbridge-msglm-6dee988b76852c6b15ef59061896ce48ce6ba978.zip
Fix megacheck / go vet issues
Diffstat (limited to 'matterhook')
-rw-r--r--matterhook/matterhook.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/matterhook/matterhook.go b/matterhook/matterhook.go
index 7d02ef4d..a2690806 100644
--- a/matterhook/matterhook.go
+++ b/matterhook/matterhook.go
@@ -134,12 +134,11 @@ func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Receive returns an incoming message from mattermost outgoing webhooks URL.
func (c *Client) Receive() IMessage {
- for {
- select {
- case msg := <-c.In:
- return msg
- }
+ var msg IMessage
+ for msg := range c.In {
+ return msg
}
+ return msg
}
// Send sends a msg to mattermost incoming webhooks URL.