1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00

Move context to metadata

This commit is contained in:
Asim
2016-01-28 17:55:28 +00:00
parent cd9801891e
commit 9ae0956cea
13 changed files with 60 additions and 60 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/codec"
c "github.com/micro/go-micro/context"
"github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/registry"
"golang.org/x/net/context"
)
@@ -175,7 +175,7 @@ func (s *rpcServer) createSubHandler(sb *subscriber, opts Options) broker.Handle
hdr[k] = v
}
delete(hdr, "Content-Type")
ctx := c.WithMetadata(context.Background(), hdr)
ctx := metadata.NewContext(context.Background(), hdr)
for i := 0; i < len(sb.handlers); i++ {
handler := sb.handlers[i]