1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

fix context value nil (#2391)

This commit is contained in:
isfk 2021-12-20 16:31:48 +08:00 committed by GitHub
parent 37de747d19
commit 8e52761edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
package nacos
import (
"context"
"errors"
"fmt"
"net"
@ -27,7 +28,9 @@ func init() {
// NewRegistry NewRegistry
func NewRegistry(opts ...registry.Option) registry.Registry {
n := &nacosRegistry{
opts: registry.Options{},
opts: registry.Options{
Context: context.Background(),
},
}
if err := configure(n, opts...); err != nil {
panic(err)