Skip to content

Commit 734722a

Browse files
committed
enter: place enter under the cluster section
It makes more sense to have the new 'enter' call as part of the cluster section. Signed-off-by: Sébastien Han <seb@redhat.com>
1 parent 74e0b66 commit 734722a

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Available Commands:
6565
version Print the version of cn
6666
kube Outputs cn kubernetes template (cn kube > kube-cn.yml)
6767
update-check Print cn current and latest version number
68-
enter Connect inside a given cluster
6968
7069
Flags:
7170
-h, --help help for cn

cmd/cluster.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ func init() {
2121
cliClusterRestart(),
2222
cliClusterLogs(),
2323
cliClusterPurge(),
24+
cliEnterNano(),
2425
)
2526
}

cmd/enter.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/spf13/cobra"
55
)
66

7+
// cliEnterNano is the Cobra CLI call
78
func cliEnterNano() *cobra.Command {
89
cmd := &cobra.Command{
910
Use: "enter [cluster]",
@@ -16,6 +17,7 @@ func cliEnterNano() *cobra.Command {
1617
return cmd
1718
}
1819

20+
// enterNano enters inside a container
1921
func enterNano(cmd *cobra.Command, args []string) {
2022
containerNameToShow := args[0]
2123
containerName := containerNamePrefix + containerNameToShow

cmd/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func init() {
115115
cliVersionNano(),
116116
cliKubeNano(),
117117
cliUpdateCheckNano(),
118-
cliEnterNano(),
119118
)
120119
rootCmd.SetHelpCommand(&cobra.Command{
121120
Use: "no-help",

0 commit comments

Comments
 (0)