simpleRequest/utils.go

27 lines
444 B
Go
Raw Permalink Normal View History

2022-03-29 03:37:40 +00:00
/*
2023-02-08 14:35:27 +00:00
*FileName: utils.go
*Author: JJXu
*CreateTime: 2022/3/29 上午11:16
*Description:
2022-03-29 03:37:40 +00:00
*/
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
}