chore: use errors.New to replace fmt.Errorf with no parameters (#4204)

Signed-off-by: RiceChuan <lc582041246@gmail.com>
This commit is contained in:
leo authored and GitHub committed 2024-12-24 00:17:00 -05:00
1 parent d54d20abea
commit b287d6419b
4 files changed
+15 -12

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ package api
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net/http"
@@ -101,7 +102,7 @@ func fetchHTTPContent(target string) ([]byte, error) {
content, err := buf.ReadAllToBytes(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read HTTP response")
return nil, errors.New("failed to read HTTP response")
}
return content, nil