Documentation: fix metadata.FromContext example

metadata.FromContext returns additional boolean value.
This fixes the example in metadata documentation.
This commit is contained in:
Gyu-Ho Lee
2016-05-12 11:07:32 -07:00
parent 54222d50cc
commit c4adca718a

View File

@ -70,7 +70,8 @@ Metadata can be retrieved from context using `FromContext`:
```go
func (s *server) SomeRPC(ctx context.Context, in *pb.SomeRequest) (*pb.SomeResponse, err) {
md := metadata.FromContext(ctx)
md, ok := metadata.FromContext(ctx)
// do something with metadata
}
```