stack-labs / questions

任何关于Micro的问题都可以在Issue中创建
27 stars 6 forks source link

micro v1升级 micro v2后 etcd作为服务发现,运行出现代理异常,undefined: proxy.Dial #84

Closed Aeosoul closed 4 years ago

Aeosoul commented 4 years ago

`package main

import ( "log" "time"

"github.com/micro/go-micro/v2"
"github.com/micro/go-plugins/registry/etcdv3"

)

func main() { registre := etcdv3.NewRegistry()

service := micro.NewService(
    micro.Registry(registre),
    micro.Name("greeter"),
    micro.RegisterTTL(time.Second*30),
    micro.RegisterInterval(time.Second*15),
)
service.Init()
if err := service.Run(); err != nil {
    log.Fatal(err)
}

} ` windows上运行 错误信息: D:\Golang\project\demo\src\AlarmService\etcdtest> go run .\main.go --registry=etcdv3 --registry_address=127.0.0.1:2379

github.com/go-git/go-git/v5/plumbing/transport/ssh

....\github.com\go-git\go-git\v5\plumbing\transport\ssh\common.go:147:15: undefined: proxy.Dial

Aeosoul commented 4 years ago

已解决