Skip to content

Commit

Permalink
Fix COLOUR command. Case drop-through: a hard habit to break, even if…
Browse files Browse the repository at this point in the history
… you know Go doesn't have it.
  • Loading branch information
Jon-Bright committed Jan 4, 2021
1 parent 523ebb6 commit eecd701
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ func (s *Server) createEffect(cmd, parms string, w *bufio.Writer) (effects.Effec
w.WriteString("0\n")
err := w.Flush()
return nil, err
case cmd == "COLOUR":
case cmd == "COLOR":
case cmd == "COLOUR" || cmd == "COLOR":
p := s.pa.GetPixels()[0]
c := fmt.Sprintf("%02x%02x%02x\n", p.R, p.G, p.B)
log.Printf("Returning %s", c)
Expand Down

0 comments on commit eecd701

Please sign in to comment.