http becomes an internal package
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetReason(r *http.Response) string {
|
||||
if i := strings.IndexByte(r.Status, ' '); i != -1 {
|
||||
return r.Status[i+1:]
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user