Drop stale GetReason() and associated tests

This commit is contained in:
pancho horrillo
2019-11-20 04:54:07 +01:00
parent b40f73115f
commit 3a47b34bc1
2 changed files with 0 additions and 51 deletions
-9
View File
@@ -21,19 +21,10 @@ import (
"errors"
"io/ioutil"
"net/http"
"strings"
"github.com/BBVA/kapow/internal/server/srverrors"
)
// GetReason returns the reason phrase part of an HTTP response
func GetReason(r *http.Response) string {
if i := strings.IndexByte(r.Status, ' '); i != -1 {
return r.Status[i+1:]
}
return ""
}
// GetReasonFromBody returns the reason phrase embedded within the JSON error
// body, or an error if no reason can be extracted
func GetReasonFromBody(r *http.Response) (string, error) {