@@ -15,7 +15,7 @@ func (r *runners) InitClusterRemove(parent *cobra.Command) *cobra.Command {
1515		Long : `Removes a cluster immediately. 
1616
1717You can specify the --all flag to terminate all clusters.` ,
18- 		RunE :              r .removeCluster ,
18+ 		RunE :              r .removeClusters ,
1919		ValidArgsFunction : r .completeClusterIDs ,
2020	}
2121	parent .AddCommand (cmd )
@@ -31,7 +31,7 @@ You can specify the --all flag to terminate all clusters.`,
3131	return  cmd 
3232}
3333
34- func  (r  * runners ) removeCluster (_  * cobra.Command , args  []string ) error  {
34+ func  (r  * runners ) removeClusters (_  * cobra.Command , args  []string ) error  {
3535	if  len (args ) ==  0  &&  ! r .args .removeClusterAll  &&  len (r .args .removeClusterNames ) ==  0  &&  len (r .args .removeClusterTags ) ==  0  {
3636		return  errors .New ("One of ID, --all, --name or --tag flag required" )
3737	} else  if  len (args ) >  0  &&  (r .args .removeClusterAll  ||  len (r .args .removeClusterNames ) >  0  ||  len (r .args .removeClusterTags ) >  0 ) {
@@ -50,7 +50,7 @@ func (r *runners) removeCluster(_ *cobra.Command, args []string) error {
5050		for  _ , cluster  :=  range  clusters  {
5151			for  _ , name  :=  range  r .args .removeClusterNames  {
5252				if  cluster .Name  ==  name  {
53- 					err  :=  remove (r , cluster .ID )
53+ 					err  :=  removeCuster (r , cluster .ID )
5454					if  err  !=  nil  {
5555						return  errors .Wrap (err , "remove cluster" )
5656					}
@@ -74,7 +74,7 @@ func (r *runners) removeCluster(_ *cobra.Command, args []string) error {
7474				for  _ , tag  :=  range  tags  {
7575					for  _ , clusterTag  :=  range  cluster .Tags  {
7676						if  clusterTag .Key  ==  tag .Key  &&  clusterTag .Value  ==  tag .Value  {
77- 							err  :=  remove (r , cluster .ID )
77+ 							err  :=  removeCuster (r , cluster .ID )
7878							if  err  !=  nil  {
7979								return  errors .Wrap (err , "remove cluster" )
8080							}
@@ -91,15 +91,15 @@ func (r *runners) removeCluster(_ *cobra.Command, args []string) error {
9191			return  errors .Wrap (err , "list clusters" )
9292		}
9393		for  _ , cluster  :=  range  clusters  {
94- 			err  :=  remove (r , cluster .ID )
94+ 			err  :=  removeCuster (r , cluster .ID )
9595			if  err  !=  nil  {
9696				return  errors .Wrap (err , "remove cluster" )
9797			}
9898		}
9999	}
100100
101101	for  _ , arg  :=  range  args  {
102- 		err  :=  remove (r , arg )
102+ 		err  :=  removeCuster (r , arg )
103103		if  err  !=  nil  {
104104			return  errors .Wrap (err , "remove cluster" )
105105		}
@@ -108,7 +108,7 @@ func (r *runners) removeCluster(_ *cobra.Command, args []string) error {
108108	return  nil 
109109}
110110
111- func  remove (r  * runners , clusterID  string ) error  {
111+ func  removeCuster (r  * runners , clusterID  string ) error  {
112112	if  r .args .removeClusterDryRun  {
113113		fmt .Printf ("would remove cluster %s\n " , clusterID )
114114		return  nil 
0 commit comments