From 248aaf2d584d90dadb30b563cf4851d2c03b0d7b Mon Sep 17 00:00:00 2001 From: Nathan Martins Date: Mon, 8 Nov 2021 15:28:53 -0300 Subject: [PATCH] lint bugfix: fixing some lint errors Signed-off-by: Nathan Martins --- pkg/services/http/request/entities/http_response.go | 4 ++-- pkg/utils/parser/parser.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/services/http/request/entities/http_response.go b/pkg/services/http/request/entities/http_response.go index fd8a313..ece97c9 100644 --- a/pkg/services/http/request/entities/http_response.go +++ b/pkg/services/http/request/entities/http_response.go @@ -16,7 +16,7 @@ package entities import ( "errors" - "io/ioutil" + "io" "net/http" "github.com/ZupIT/horusec-devkit/pkg/services/http/request/enums" @@ -32,7 +32,7 @@ func (h *HTTPResponse) GetBodyBytes() ([]byte, error) { return []byte{}, nil } - return ioutil.ReadAll(h.Body) + return io.ReadAll(h.Body) } func (h *HTTPResponse) GetStatusCodeString() string { diff --git a/pkg/utils/parser/parser.go b/pkg/utils/parser/parser.go index b6bc75d..9f32a8c 100644 --- a/pkg/utils/parser/parser.go +++ b/pkg/utils/parser/parser.go @@ -17,7 +17,6 @@ package parser import ( "encoding/json" "io" - "io/ioutil" "strings" "github.com/google/uuid" @@ -59,7 +58,7 @@ func ParseEntityToIOReadCloser(entity interface{}) (io.ReadCloser, error) { return nil, err } - return ioutil.NopCloser(strings.NewReader(string(bytes))), nil + return io.NopCloser(strings.NewReader(string(bytes))), nil } func ParseStringToUUID(id string) uuid.UUID {