1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +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

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)