chore: Use http constants to replace numbers as parameters

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
xin.li
2023-02-19 20:41:10 +08:00
committed by Benjamin Wang
parent 8e56e2f5ce
commit b17b9c1428
13 changed files with 23 additions and 23 deletions

View File

@ -574,7 +574,7 @@ func (cr *streamReader) dial(t streamType) (io.ReadCloser, error) {
zap.String("address", uu.String()),
)
}
req, err := http.NewRequest("GET", uu.String(), nil)
req, err := http.NewRequest(http.MethodGet, uu.String(), nil)
if err != nil {
cr.picker.unreachable(u)
return nil, fmt.Errorf("failed to make http request to %v (%v)", u, err)