mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-12 02:28:05 +02:00
perf: optimize the http.ContentType method (#3363)
Co-authored-by: huangzw <huangzw@2345.com>
This commit is contained in:
parent
d50609d4a0
commit
2f94905f28
@ -10,7 +10,7 @@ const (
|
||||
|
||||
// ContentType returns the content-type with base prefix.
|
||||
func ContentType(subtype string) string {
|
||||
return strings.Join([]string{baseContentType, subtype}, "/")
|
||||
return baseContentType + "/" + subtype
|
||||
}
|
||||
|
||||
// ContentSubtype returns the content-subtype for the given content-type. The
|
||||
|
Loading…
Reference in New Issue
Block a user