1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-21 19:19:32 +02:00

correct the func name in meatadata log (#1915)

This commit is contained in:
Windfarer 2022-04-10 16:18:56 +08:00 committed by GitHub
parent 9ca08888df
commit 3990d91b9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ func FromClientContext(ctx context.Context) (Metadata, bool) {
// with any existing metadata in the context.
func AppendToClientContext(ctx context.Context, kv ...string) context.Context {
if len(kv)%2 == 1 {
panic(fmt.Sprintf("metadata: AppendToOutgoingContext got an odd number of input pairs for metadata: %d", len(kv)))
panic(fmt.Sprintf("metadata: AppendToClientContext got an odd number of input pairs for metadata: %d", len(kv)))
}
md, _ := FromClientContext(ctx)
md = md.Clone()