cmd/lists.go
changeset 265 05c40b36d3b2
parent 239 605a00e9d1ab
child 268 4dd196a4ee7c
equal deleted inserted replaced
264:8f478162d991 265:05c40b36d3b2
     1 // Copyright © 2018 Mikael Berthe <mikael@lilotux.net>
     1 // Copyright © 2018-2023 Mikael Berthe <mikael@lilotux.net>
     2 //
     2 //
     3 // Licensed under the MIT license.
     3 // Licensed under the MIT license.
     4 // Please see the LICENSE file is this directory.
     4 // Please see the LICENSE file is this directory.
     5 
     5 
     6 package cmd
     6 package cmd
     9 	"os"
     9 	"os"
    10 
    10 
    11 	"github.com/pkg/errors"
    11 	"github.com/pkg/errors"
    12 	"github.com/spf13/cobra"
    12 	"github.com/spf13/cobra"
    13 
    13 
    14 	"github.com/McKael/madon/v2"
    14 	"github.com/McKael/madon/v3"
    15 )
    15 )
    16 
    16 
    17 var listsOpts struct {
    17 var listsOpts struct {
    18 	listID     int64
    18 	listID     int64
    19 	accountID  int64
    19 	accountID  int64
    23 	// Used for several subcommands to limit the number of results
    23 	// Used for several subcommands to limit the number of results
    24 	limit, keep uint
    24 	limit, keep uint
    25 	all         bool
    25 	all         bool
    26 }
    26 }
    27 
    27 
    28 //listsCmd represents the lists command
    28 // listsCmd represents the lists command
    29 var listsCmd = &cobra.Command{
    29 var listsCmd = &cobra.Command{
    30 	Use:     "lists",
    30 	Use:     "lists",
    31 	Aliases: []string{"list"},
    31 	Aliases: []string{"list"},
    32 	Short:   "Manage lists",
    32 	Short:   "Manage lists",
    33 	Example: `  madonctl lists create --title "Friends"
    33 	Example: `  madonctl lists create --title "Friends"