mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 19:39:35 +03:00
chore: use errors.New to replace fmt.Errorf with no parameters (#4204)
Signed-off-by: RiceChuan <lc582041246@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user