Skip to content

Commit cb1e950

Browse files
authored
chore(loo-4736): move login to auth command (#6)
1 parent bd872b2 commit cb1e950

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

cmd/auth.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package cmd
2+
3+
import "github.com/spf13/cobra"
4+
5+
var authCmd = &cobra.Command{
6+
Use: "auth",
7+
Short: "Manage authentication",
8+
}
9+
10+
func init() {
11+
rootCmd.AddCommand(authCmd)
12+
}

cmd/debug.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"github.com/spf13/cobra"
1010
)
1111

12-
var debugCmd = &cobra.Command{
13-
Use: "debug",
12+
var statusCmd = &cobra.Command{
13+
Use: "status",
1414
Short: "Print the resolved configuration",
1515
RunE: func(cmd *cobra.Command, args []string) error {
1616
cfg, err := config.Load()
@@ -29,5 +29,5 @@ var debugCmd = &cobra.Command{
2929
}
3030

3131
func init() {
32-
rootCmd.AddCommand(debugCmd)
32+
authCmd.AddCommand(statusCmd)
3333
}

cmd/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ var loginCmd = &cobra.Command{
4343
}
4444

4545
func init() {
46-
rootCmd.AddCommand(loginCmd)
46+
authCmd.AddCommand(loginCmd)
4747
}

cmd/logout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ var logoutCmd = &cobra.Command{
2020
}
2121

2222
func init() {
23-
rootCmd.AddCommand(logoutCmd)
23+
authCmd.AddCommand(logoutCmd)
2424
}

0 commit comments

Comments
 (0)