Exemple #1
0
func (sc *ListCommand) Run() error {

	req := &msg.ListRequest{}

	response, err := sc.Ctx.Client.List(context.Background(), req)
	if err != nil {
		sc.Fatal("ERROR:" + err.Error())
	}

	results := response.GetResults()
	core.PrintSearchResults(results)

	return nil
}
Exemple #2
0
func (sc *SearchCommand) Run() error {

	packageName := sc.fs.Arg(0)

	req := &msg.SearchRequest{PackageName: packageName}

	response, err := sc.Ctx.Client.Search(context.Background(), req)
	if err != nil {
		sc.Fatal("ERROR:" + err.Error())
	}

	results := response.GetResults()
	core.PrintSearchResults(results)

	return nil
}