We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bcc118 commit 7773b61Copy full SHA for 7773b61
mimetype_match_test.go
@@ -9,16 +9,16 @@ import (
9
10
func ExampleMimeType_Match() {
11
// Parse media type
12
- mediaType := "application/json; q=1; param=test;"
+ mediaType := "application/xml; q=1; param=test;"
13
14
mimeType, err := mimeheader.ParseMediaType(mediaType)
15
if err != nil {
16
panic(err)
17
}
18
19
// Parse input and match it.
20
- fmt.Println(mimeType.Match(mimeheader.MimeType{Type: "application", Subtype: "json"}))
21
fmt.Println(mimeType.Match(mimeheader.MimeType{Type: "application", Subtype: "xml"}))
+ fmt.Println(mimeType.Match(mimeheader.MimeType{Type: "application", Subtype: "json"}))
22
// Output:
23
// true
24
// false
0 commit comments