From 6dee988b76852c6b15ef59061896ce48ce6ba978 Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 14 Jul 2017 00:35:01 +0200 Subject: Fix megacheck / go vet issues --- matterhook/matterhook.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'matterhook') 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. -- cgit v1.2.3