Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Meyer committed Apr 10, 2015
1 parent 7075869 commit d336d84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ type wire_protocol_parser struct {
}

func (parser *wire_protocol_parser) parse(command []byte) string {
var data []json.RawMessage
if err := json.Unmarshal(command, &data); err != nil {
var raw_command []json.RawMessage
if err := json.Unmarshal(command, &raw_command); err != nil {
return fail_response("invalid command")
}

var request string
if err := json.Unmarshal(data[0], &request); err != nil {
if err := json.Unmarshal(raw_command[0], &request); err != nil {
return fail_response("invalid command")
}

return parser.evaluate(request, data)
return parser.evaluate(request, raw_command)
}

func (parser *wire_protocol_parser) evaluate(request string, command []json.RawMessage) string {
Expand Down

0 comments on commit d336d84

Please sign in to comment.