fix(Compile): Fixed error "<module> is not in GOROOT"

This commit is contained in:
netbenix 2022-08-27 19:08:57 +02:00
parent cbbe886dbb
commit 39a136dc50
4 changed files with 35 additions and 30 deletions

View file

@ -3,8 +3,8 @@ package ProtoHandler
import (
"golang.org/x/net/context"
"google.golang.org/grpc"
proto "lotus-pm.net/proto"
"lpm-cli/Lotus"
proto "lpm-cli/Proto/lpm/go"
"time"
)
@ -22,25 +22,24 @@ func (protoWrap ProtoWrapper) CreateConnection(address string) *grpc.ClientConn
func (protoWrap ProtoWrapper) CreateRegistryClient(conn *grpc.ClientConn) (proto.LpmRegistryClient, context.Context, context.CancelFunc) {
lrc := proto.NewLpmRegistryClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 10)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
return lrc, ctx, cancel
}
func (protoWrap ProtoWrapper) ParsePackages(res *proto.SearchResponse, reg Lotus.Registry) []Package {
var packages []Package
for _, pkg := range res.GetPackages() {
var tmpMeta PackageMetadata
tmpMeta.FillMetadata(pkg)
packages = append(packages, Package {
packages = append(packages, Package{
PackageMetadata: tmpMeta,
Register: Lotus.Registry{
Register: reg.Register,
Address: reg.Address,
Address: reg.Address,
},
})
}
return packages
}
}