mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Fixed error message format for list command
This commit is contained in:
parent
39ad0d75c6
commit
3d6daa757a
1 changed files with 2 additions and 3 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"github.com/OpenCHAMI/magellan/internal/cache/sqlite"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
@ -27,7 +26,7 @@ var listCmd = &cobra.Command{
|
|||
Run: func(cmd *cobra.Command, args []string) {
|
||||
scannedResults, err := sqlite.GetScannedAssets(cachePath)
|
||||
if err != nil {
|
||||
logrus.Errorf("failed to get scanned assets: %v\n", err)
|
||||
log.Error().Err(err).Msg("failed to get scanned assets")
|
||||
}
|
||||
format = strings.ToLower(format)
|
||||
if format == "json" {
|
||||
|
|
@ -45,6 +44,6 @@ var listCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
listCmd.Flags().StringVar(&format, "format", "", "set the output format")
|
||||
listCmd.Flags().StringVar(&format, "format", "", "set the output format (json|default)")
|
||||
rootCmd.AddCommand(listCmd)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue