mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-11 13:41:14 -04:00
livereload: Simplify conditional
This commit is contained in:
parent
2c5e4f7640
commit
bafb77172b
@ -33,8 +33,7 @@ func (c *connection) reader() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
switch true {
|
if bytes.Contains(message, []byte(`"command":"hello"`)){
|
||||||
case bytes.Contains(message, []byte(`"command":"hello"`)):
|
|
||||||
c.send <- []byte(`{
|
c.send <- []byte(`{
|
||||||
"command": "hello",
|
"command": "hello",
|
||||||
"protocols": [ "http://livereload.com/protocols/official-7" ],
|
"protocols": [ "http://livereload.com/protocols/official-7" ],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user