ref: bafb77172b8896131db6fad002a32df087b6aec1
parent: 2c5e4f7640e71d2a193a74e6c41109ec40bc0222
author: srinivasreddy <[email protected]>
date: Sun Mar 20 19:49:51 EDT 2016
livereload: Simplify conditional
--- a/livereload/connection.go
+++ b/livereload/connection.go
@@ -33,8 +33,7 @@
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" ],