chore: tweak package name

This commit is contained in:
Steven
2024-05-06 07:18:54 +08:00
parent da535c8dc6
commit dfc0889a4f
9 changed files with 14 additions and 17 deletions

15
plugin/httpgetter/util.go Normal file
View File

@@ -0,0 +1,15 @@
package httpgetter
import (
"mime"
"net/http"
)
func getMediatype(response *http.Response) (string, error) {
contentType := response.Header.Get("content-type")
mediatype, _, err := mime.ParseMediaType(contentType)
if err != nil {
return "", err
}
return mediatype, nil
}