Move context to metadata
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/micro/go-micro/client"
|
||||
"github.com/micro/go-micro/cmd"
|
||||
c "github.com/micro/go-micro/context"
|
||||
example "github.com/micro/go-micro/examples/server/proto/example"
|
||||
"github.com/micro/go-micro/metadata"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ func pub(i int) {
|
||||
})
|
||||
|
||||
// create context with metadata
|
||||
ctx := c.WithMetadata(context.Background(), map[string]string{
|
||||
ctx := metadata.NewContext(context.Background(), map[string]string{
|
||||
"X-User-Id": "john",
|
||||
"X-From-Id": "script",
|
||||
})
|
||||
|
Reference in New Issue
Block a user