From a60a53f39a080f27e0f2fee34f7c12d63c9e9152 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 07:28:56 +0000 Subject: [PATCH] Format code with gofmt This commit fixes the style issues introduced in bda217d according to the output from gofmt. Details: https://deepsource.icu/gh/subham-deepsource/redcon/transform/1d05c68d-fc7a-482d-95b1-2444e646db10/ --- resp.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/resp.go b/resp.go index 1d70c3f..ab6e212 100644 --- a/resp.go +++ b/resp.go @@ -44,7 +44,7 @@ func (r *RESP) ForEach(iter func(resp RESP) bool) { // took up the result. func ReadNextRESP(b []byte) (n int, resp RESP) { if len(b) == 0 { - return 0, RESP{} // no data to read + return 0, RESP{} // no data to read } resp.Type = Type(b[0]) switch resp.Type { @@ -57,18 +57,17 @@ func ReadNextRESP(b []byte) (n int, resp RESP) { for ; ; i++ { if i == len(b) { return 0, RESP{} // not enough data - } + } if b[i] == '\n' { - - - if b[i-1] != '\r' { + + if b[i-1] != '\r' { return 0, RESP{} //, missing CR character } i++ break } } - resp.Raw = b[0:i] + resp.Raw = b[0:i] resp.Data = b[1 : i-2] if resp.Type == Integer { // Integer