mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
testutil: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
23b6b5a9ae
commit
a617809fe7
2 changed files with 3 additions and 3 deletions
|
@ -328,7 +328,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
|
|||
Transport: clientConfig.transport,
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/_ping", nil)
|
||||
req, err := http.NewRequest(http.MethodGet, "/_ping", nil)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "[%s] could not create new request", d.id)
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ func (d *Daemon) queryRootDir() (string, error) {
|
|||
Transport: clientConfig.transport,
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/info", nil)
|
||||
req, err := http.NewRequest(http.MethodGet, "/info", nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ func newRequest(endpoint string, opts *Options) (*http.Request, error) {
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed parsing url %q", opts.host)
|
||||
}
|
||||
req, err := http.NewRequest("GET", endpoint, nil)
|
||||
req, err := http.NewRequest(http.MethodGet, endpoint, nil)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create request")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue