Skip to content

Commit

Permalink
Update middleware.md (#2471)
Browse files Browse the repository at this point in the history
Fix a wrong struct name and add a package name
  • Loading branch information
tunggnu committed Jan 31, 2024
1 parent 0c2efed commit 44139c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/middleware.md
Expand Up @@ -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)
}

// ...
Expand All @@ -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)

Expand Down

0 comments on commit 44139c8

Please sign in to comment.