Use NewOutgoingContext
in the metadata doc (#1425)
Removed the deprecated `NewContext` from the doc so that the documentation would match example given in the doc
This commit is contained in:

committed by
Menghan Li

parent
53ae6b7e90
commit
39c8c3866d
@ -82,7 +82,7 @@ func (s *server) SomeRPC(ctx context.Context, in *pb.SomeRequest) (*pb.SomeRespo
|
|||||||
|
|
||||||
### Sending metadata
|
### Sending metadata
|
||||||
|
|
||||||
To send metadata to server, the client can wrap the metadata into a context using `NewContext`, and make the RPC with this context:
|
To send metadata to server, the client can wrap the metadata into a context using `NewOutgoingContext`, and make the RPC with this context:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
md := metadata.Pairs("key", "val")
|
md := metadata.Pairs("key", "val")
|
||||||
|
Reference in New Issue
Block a user