client: use constants for http methods

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-10-12 20:41:14 +02:00
parent 93100adb69
commit dabc7cdb56
42 changed files with 54 additions and 54 deletions

View File

@@ -35,7 +35,7 @@ func TestSwarmUnlock(t *testing.T) {
if !strings.HasPrefix(req.URL.Path, expectedURL) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL)
}
if req.Method != "POST" {
if req.Method != http.MethodPost {
return nil, fmt.Errorf("expected POST method, got %s", req.Method)
}
return &http.Response{