File: internal.go

package info (click to toggle)
golang-github-getkin-kin-openapi 0.32.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,116 kB
  • sloc: makefile: 3
file content (13 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
package openapi3filter

import (
	"strings"
)

func parseMediaType(contentType string) string {
	i := strings.IndexByte(contentType, ';')
	if i < 0 {
		return contentType
	}
	return contentType[:i]
}