1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-07-17 01:42:34 +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

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