1
0
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:
Name 2024-08-19 10:55:17 +08:00 committed by GitHub
parent d50609d4a0
commit 2f94905f28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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