examples/basic-practices/micro-service/stream/file 问题
ping40 opened this issue · 5 comments
ping40 commented
本地环境:ubuntu 19.4
go version: go version go1.13 linux/amd64
现象:
ping@ping:/gp/src/github.com/micro-in-cn/tutorials/examples/basic-practices/micro-service/stream/file$ go run client.go
# command-line-arguments
./client.go:42:56: cannot use func literal (type func(*"github.com/micro/go-micro/client".CallOptions)) as type "github.com/micro/go-micro/v2/client".CallOption in argument to fileService.File
./client.go:95:5: cannot use func literal (type func(*"github.com/micro/go-micro/client".CallOptions)) as type "github.com/micro/go-micro/v2/client".CallOption in argument to fileService.DealFile
./client.go:114:4: cannot use service.Client() (type "github.com/micro/go-micro/v2/client".Client) as type "github.com/micro/go-micro/client".Client in assignment:
"github.com/micro/go-micro/v2/client".Client does not implement "github.com/micro/go-micro/client".Client (wrong type for Call method)
have Call(context.Context, "github.com/micro/go-micro/v2/client".Request, interface {}, ..."github.com/micro/go-micro/v2/client".CallOption) error
want Call(context.Context, "github.com/micro/go-micro/client".Request, interface {}, ..."github.com/micro/go-micro/client".CallOption) error
./client.go:115:37: cannot use c (type "github.com/micro/go-micro/client".Client) as type "github.com/micro/go-micro/v2/client".Client in argument to file.NewFileService:
"github.com/micro/go-micro/client".Client does not implement "github.com/micro/go-micro/v2/client".Client (wrong type for Call method)
have Call(context.Context, "github.com/micro/go-micro/client".Request, interface {}, ..."github.com/micro/go-micro/client".CallOption) error
want Call(context.Context, "github.com/micro/go-micro/v2/client".Request, interface {}, ..."github.com/micro/go-micro/v2/client".CallOption) error
需要修改client.go:
"github.com/micro/go-micro/client"
修改为:
"github.com/micro/go-micro/v2/client"
printfcoder commented
hi,最近在整体升级到v2,忙不过来,可以一起把示例都升上去不?顺便调整目录
ping40 commented
那我就 PR 吧
顺便调整目录 --> 具体是指什么 ?
printfcoder commented
就是把之前的初中高目录打散放到example根目录,后面我们会新增一个更好的进阶教程。
printfcoder commented
怎么看?
ping40 commented
我感觉我不好操作