MCPcopy Index your code
hub / github.com/coder/coder / parseMimeType

Function parseMimeType

codersdk/client.go:563–570  ·  view source on GitHub ↗
(contentType string)

Source from the content-addressed store, hash-verified

561}
562
563func parseMimeType(contentType string) string {
564 mimeType, _, err := mime.ParseMediaType(contentType)
565 if err != nil {
566 mimeType = strings.TrimSpace(strings.Split(contentType, ";")[0])
567 }
568
569 return mimeType
570}
571
572// Response represents a generic HTTP response.
573type Response struct {

Callers 2

ExpectJSONMimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected