Updated SearchCommand to new structure
This commit is contained in:
parent
65f2051a5e
commit
450167cd54
1 changed files with 2 additions and 2 deletions
|
|
@ -1,8 +1,8 @@
|
|||
package Commands
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/urfave/cli/v2"
|
||||
"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
|
||||
|
|
|
|||
Reference in a new issue