Documentation and better naming
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// 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:]
|
||||
|
||||
Reference in New Issue
Block a user