mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 23:11:25 +02:00
refactor: remove forward auth, move module net/http to net/gphttp
This commit is contained in:
11
internal/net/gphttp/status_code.go
Normal file
11
internal/net/gphttp/status_code.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package gphttp
|
||||
|
||||
import "net/http"
|
||||
|
||||
func IsSuccess(status int) bool {
|
||||
return status >= http.StatusOK && status < http.StatusMultipleChoices
|
||||
}
|
||||
|
||||
func IsStatusCodeValid(status int) bool {
|
||||
return http.StatusText(status) != ""
|
||||
}
|
||||
Reference in New Issue
Block a user