From 7c7c7df52ea9f3863ae25cc1e11df22a0a57909e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Sun, 26 Sep 2021 18:18:28 +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/92db2586-ec0f-4a78-9d52-47db7817aac1/ --- 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