magellan/cmd/list.go
2023-08-29 14:36:57 -06:00

26 lines
No EOL
480 B
Go

package cmd
import (
magellan "davidallendj/magellan/internal"
"fmt"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var listCmd = &cobra.Command{
Use: "list",
Short: "List information from scan",
Run: func(cmd *cobra.Command, args []string) {
probeResults, err := magellan.GetStates(dbpath)
if err != nil {
logrus.Errorf("could not get probe results: %v\n", err)
}
fmt.Printf("%v\n", probeResults)
},
}
func init() {
rootCmd.AddCommand(listCmd)
}