We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
That reports an error when I use nacos registry in web.NewService(): panic: assignment to entry in nil map My code:
package main import ( "user/config/config" "go-micro.dev/v4/web" ) var ( service = "go-layout" version = "latest" ) func main() { srv := web.NewService( web.Name(service), web.Version(version), web.Registry(config.NewRegistry()), // web.Metadata(map[string]string{"version": version}), ) srv.Run() }
package config import ( "github.com/asim/go-micro/plugins/registry/nacos/v4" "github.com/nacos-group/nacos-sdk-go/v2/common/constant" "go-micro.dev/v4/registry" ) func NewRegistry() registry.Registry { DefaultClientConfig := constant.ClientConfig{ NamespaceId: "45d1be27-88ab-487d-b0ba-c09557fcaf29", } r := nacos.NewRegistry( nacos.WithClientConfig(DefaultClientConfig), nacos.WithAddress([]string{ "127.0.0.1:8848", })) return r }
go.mod
module user go 1.18 require ( github.com/asim/go-micro/plugins/registry/nacos/v4 v4.0.0-20220404185419-6dedee5d8c2c github.com/nacos-group/nacos-sdk-go/v2 v2.0.1 go-micro.dev/v4 v4.2.1 )
Debug code,I find it will be ok to add web.Metadat option in web.NewService().
Environment: Go Version: go version go1.18 windows/amd64
The text was updated successfully, but these errors were encountered:
No branches or pull requests
That reports an error when I use nacos registry in web.NewService():
panic: assignment to entry in nil map
My code:
go.mod
Debug code,I find it will be ok to add web.Metadat option in web.NewService().
Environment:
Go Version: go version go1.18 windows/amd64
The text was updated successfully, but these errors were encountered: