cmd/status.go
changeset 176 7efbbed5cf3c
parent 168 ce4000ac7294
child 179 a60295c41321
equal deleted inserted replaced
175:adcead24cdf1 176:7efbbed5cf3c
    10 	"os"
    10 	"os"
    11 	"strings"
    11 	"strings"
    12 
    12 
    13 	"github.com/pkg/errors"
    13 	"github.com/pkg/errors"
    14 	"github.com/spf13/cobra"
    14 	"github.com/spf13/cobra"
       
    15 	flag "github.com/spf13/pflag"
    15 
    16 
    16 	"github.com/McKael/madon"
    17 	"github.com/McKael/madon"
    17 )
    18 )
       
    19 
       
    20 var statusPostFlags *flag.FlagSet
    18 
    21 
    19 var statusOpts struct {
    22 var statusOpts struct {
    20 	statusID int64
    23 	statusID int64
    21 	unset    bool
    24 	unset    bool
    22 
    25 
    73 	annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"}
    76 	annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"}
    74 
    77 
    75 	statusPostSubcommand.Flags().Lookup("visibility").Annotations = annotation
    78 	statusPostSubcommand.Flags().Lookup("visibility").Annotations = annotation
    76 
    79 
    77 	// This one will be used to check if the options were explicitly set or not
    80 	// This one will be used to check if the options were explicitly set or not
    78 	updateFlags = statusPostSubcommand.Flags()
    81 	statusPostFlags = statusPostSubcommand.Flags()
    79 }
    82 }
    80 
    83 
    81 // statusCmd represents the status command
    84 // statusCmd represents the status command
    82 // This command does nothing without a subcommand
    85 // This command does nothing without a subcommand
    83 var statusCmd = &cobra.Command{
    86 var statusCmd = &cobra.Command{