simplify context retrieval

This commit is contained in:
Darien Raymond
2018-02-21 17:05:29 +01:00
parent af967c2b72
commit 88b25d38cb
21 changed files with 30 additions and 88 deletions

View File

@@ -32,12 +32,8 @@ func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) {
}
client := &Client{
serverPicker: protocol.NewRoundRobinServerPicker(serverList),
v: core.FromContext(ctx),
v: core.MustFromContext(ctx),
}
if client.v == nil {
return nil, newError("V is not in context.")
}
return client, nil
}