Updated SearchCommand to new structure

This commit is contained in:
netbenix 2021-11-09 10:41:11 +01:00
parent 65f2051a5e
commit 450167cd54

View file

@ -1,8 +1,8 @@
package Commands
import (
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli/v2"
"github.com/olekukonko/tablewriter"
"lpm-cli/Lotus"
"lpm-cli/ProtoHandler"
"os"
@ -26,7 +26,7 @@ func NewSearchCommand() *cli.Command {
table.SetHeader([]string{"Publisher", "Package", "Description", "Latest Version", "Registry"})
for _, pkg := range packages {
table.Append([]string{pkg.Publisher, pkg.Name, pkg.Description, pkg.Version, "[core]"})
table.Append([]string{pkg.PackageMetadata.Publisher, pkg.PackageMetadata.Name, pkg.PackageMetadata.Description, pkg.PackageMetadata.Version, pkg.Register.Register})
}
table.Render()
//Sample code end