chore: Use http constants to replace numbers as parameters
Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user