1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-11 17:18:28 +02:00

initialize client options context if not provided

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Vasiliy Tolstov 2019-12-03 01:35:59 +03:00
parent 6f1c30aef5
commit 90f9b0d0c9

View File

@ -125,6 +125,10 @@ func newOptions(options ...Option) Options {
opts.Transport = transport.DefaultTransport
}
if opts.Context == nil {
opts.Context = context.Background()
}
return opts
}