We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91b533 commit f842f07Copy full SHA for f842f07
1 file changed
encoding/encode.go
@@ -51,8 +51,8 @@ func RegisterEncoder[T EncoderConstraint](enc T, mime string, aliases ...string)
51
52
// GetEncoder returns the response encoder for a given media type.
53
func GetEncoder(mime string) ResponseEncoder {
54
- mimeParts := strings.Split(mime, ",")
55
- for _, part := range mimeParts {
+ mimeParts := strings.SplitSeq(mime, ",")
+ for part := range mimeParts {
56
if enc, ok := encoders[part]; ok {
57
return enc
58
}
0 commit comments