package cmd import ( "axolotl/db" "axolotl/output" "github.com/spf13/cobra" ) var inboxCmd = &cobra.Command{ Use: "inbox", Short: "Show your inbox", Run: func(cmd *cobra.Command, args []string) { d, err := db.GetDB() user := db.GetCurrentUser() nodes, err := d.ListNodes(db.ListFilter{ Inbox: user, }) if err != nil { return } output.PrintNodes(cmd.OutOrStdout(), nodes, jsonFlag) }, } func init() { rootCmd.AddCommand(inboxCmd) }