forked from abiosoft/colima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.go
27 lines (22 loc) · 612 Bytes
/
status.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cmd
import (
"github.com/abiosoft/colima/cmd/root"
"github.com/spf13/cobra"
)
var statusCmdArgs struct {
extended bool
}
// statusCmd represents the status command
var statusCmd = &cobra.Command{
Use: "status [profile]",
Short: "show the status of Colima",
Long: `Show the status of Colima`,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return newApp().Status(statusCmdArgs.extended)
},
}
func init() {
root.Cmd().AddCommand(statusCmd)
statusCmd.Flags().BoolVarP(&statusCmdArgs.extended, "extended", "e", false, "include additional details")
}