cmd/status.go
changeset 113 2e411da68fd3
parent 110 57843255fd1a
child 129 11966471aac3
equal deleted inserted replaced
112:58d30ab47543 113:2e411da68fd3
    80 	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
    80 	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
    81 		// This is common to status and all status subcommands but "post"
    81 		// This is common to status and all status subcommands but "post"
    82 		if statusOpts.statusID < 1 && cmd.Name() != "post" {
    82 		if statusOpts.statusID < 1 && cmd.Name() != "post" {
    83 			return errors.New("missing status ID")
    83 			return errors.New("missing status ID")
    84 		}
    84 		}
    85 		if err := madonInit(true); err != nil {
    85 		return madonInit(true)
    86 			return err
       
    87 		}
       
    88 		return nil
       
    89 	},
    86 	},
    90 }
    87 }
    91 
    88 
    92 var statusSubcommands = []*cobra.Command{
    89 var statusSubcommands = []*cobra.Command{
    93 	&cobra.Command{
    90 	&cobra.Command{