From bafb77172b8896131db6fad002a32df087b6aec1 Mon Sep 17 00:00:00 2001 From: srinivasreddy Date: Sun, 20 Mar 2016 23:49:51 +0530 Subject: [PATCH] livereload: Simplify conditional --- livereload/connection.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/livereload/connection.go b/livereload/connection.go index 533cfe889..154c823ff 100644 --- a/livereload/connection.go +++ b/livereload/connection.go @@ -33,8 +33,7 @@ func (c *connection) reader() { if err != nil { break } - switch true { - case bytes.Contains(message, []byte(`"command":"hello"`)): + if bytes.Contains(message, []byte(`"command":"hello"`)){ c.send <- []byte(`{ "command": "hello", "protocols": [ "http://livereload.com/protocols/official-7" ],