http becomes an internal package

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-10-03 14:12:14 +02:00
parent 0144569f58
commit 681ee3cba8
5 changed files with 1 additions and 1 deletions
+14
View File
@@ -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 ""
}
}