MCPcopy
hub / github.com/gofiber/fiber / FilterFlags

Function FilterFlags

binder/mapping.go:349–354  ·  view source on GitHub ↗

FilterFlags returns the media type value by trimming any parameters from a Content-Type header.

(content string)

Source from the content-addressed store, hash-verified

347
348// FilterFlags returns the media type value by trimming any parameters from a Content-Type header.
349func FilterFlags(content string) string {
350 if i := strings.IndexAny(content, " ;"); i >= 0 {
351 return content[:i]
352 }
353 return content
354}
355
356func formatBindData[T, K any](aliasTag string, out any, data map[string][]T, key string, value K, enableSplitting, supportBracketNotation bool) error { //nolint:revive // it's okay
357 var err error

Callers 5

WithInputMethod · 0.92
BodyMethod · 0.92
BindMethod · 0.85
Test_FilterFlagsFunction · 0.85
Benchmark_FilterFlagsFunction · 0.85

Calls

no outgoing calls

Tested by 2

Test_FilterFlagsFunction · 0.68
Benchmark_FilterFlagsFunction · 0.68