You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simpleRequest/utils.go

27 lines
444 B
Go

/*
2 years ago
*FileName: utils.go
*Author: JJXu
*CreateTime: 2022/3/29 11:16
*Description:
*/
package simpleRequest
func IsJSONType(ct string) bool {
return jsonCheck.MatchString(ct)
}
// IsXMLType method is to check XML content type or not
func IsXMLType(ct string) bool {
return xmlCheck.MatchString(ct)
}
func IsInArray(arr []string, str string) bool {
for _, v := range arr {
if v == str {
return true
}
}
return false
}