Format fixing
This commit is contained in:
parent
86489ac84f
commit
0a7d8313b7
1 changed files with 3 additions and 3 deletions
|
|
@ -14,14 +14,14 @@ func createConnection() *grpc.ClientConn{
|
||||||
|
|
||||||
//TODO Remove Hardcoded addr
|
//TODO Remove Hardcoded addr
|
||||||
conn, err := grpc.Dial("localhost:9090", grpc.WithInsecure())
|
conn, err := grpc.Dial("localhost:9090", grpc.WithInsecure())
|
||||||
if err != nil{
|
if err != nil {
|
||||||
logger.Fatal(err)
|
logger.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return conn
|
return conn
|
||||||
}
|
}
|
||||||
|
|
||||||
func createRegistryClient(conn *grpc.ClientConn) (proto.LpmRegistryClient, context.Context, context.CancelFunc){
|
func createRegistryClient(conn *grpc.ClientConn) (proto.LpmRegistryClient, context.Context, context.CancelFunc) {
|
||||||
|
|
||||||
lrc := proto.NewLpmRegistryClient(conn)
|
lrc := proto.NewLpmRegistryClient(conn)
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 10)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 10)
|
||||||
|
|
@ -39,7 +39,7 @@ func SearchPackages(platform string, architecture []string, query string) []Pack
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
res, connErr := client.Search(ctx, &proto.SearchRequest{Platform: platform, Architecture: architecture, Query: query})
|
res, connErr := client.Search(ctx, &proto.SearchRequest{Platform: platform, Architecture: architecture, Query: query})
|
||||||
if connErr != nil{
|
if connErr != nil {
|
||||||
logger.Fatal(connErr)
|
logger.Fatal(connErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue