From 44139c8822f503598a25c029567948428fa37962 Mon Sep 17 00:00:00 2001 From: Tom Nguyen <7121553+tunggnu@users.noreply.github.com> Date: Wed, 31 Jan 2024 23:50:06 +0700 Subject: [PATCH] Update middleware.md (#2471) Fix a wrong struct name and add a package name --- content/en/docs/middleware.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/middleware.md b/content/en/docs/middleware.md index 5f452daf034..f4762df4007 100644 --- a/content/en/docs/middleware.md +++ b/content/en/docs/middleware.md @@ -182,7 +182,7 @@ func GetCustomKey(ctx context.Context) (v string) { } func SetCustomKey(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, customkey{}, value) + return middleware.WithStackValue(ctx, customKey{}, value) } // ... @@ -200,7 +200,7 @@ var customInitalize = middleware.InitializeMiddlewareFunc("customInitialize", fu var customBuild = middleware.BuildMiddlewareFunc("customBuild", func( ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, ) ( - out middleware.BuildOutput, metadata Metadata, err error, + out middleware.BuildOutput, metadata middleware.Metadata, err error, ) { customValue := GetCustomKey(ctx)