@@ -22,7 +22,7 @@ func cmdRm(c CommandLine, api libmachine.API) error {
2222
2323 force := c .Bool ("force" )
2424 confirm := c .Bool ("y" )
25- var errorOccured []string
25+ var errorOccurred []string
2626
2727 if ! userConfirm (confirm , force ) {
2828 return nil
@@ -31,21 +31,21 @@ func cmdRm(c CommandLine, api libmachine.API) error {
3131 for _ , hostName := range c .Args () {
3232 err := removeRemoteMachine (hostName , api )
3333 if err != nil {
34- errorOccured = collectError (fmt .Sprintf ("Error removing host %q: %s" , hostName , err ), force , errorOccured )
34+ errorOccurred = collectError (fmt .Sprintf ("Error removing host %q: %s" , hostName , err ), force , errorOccurred )
3535 }
3636
3737 if err == nil || force {
3838 removeErr := removeLocalMachine (hostName , api )
3939 if removeErr != nil {
40- errorOccured = collectError (fmt .Sprintf ("Can't remove \" %s\" " , hostName ), force , errorOccured )
40+ errorOccurred = collectError (fmt .Sprintf ("Can't remove \" %s\" " , hostName ), force , errorOccurred )
4141 } else {
4242 log .Infof ("Successfully removed %s" , hostName )
4343 }
4444 }
4545 }
4646
47- if len (errorOccured ) > 0 && ! force {
48- return errors .New (strings .Join (errorOccured , "\n " ))
47+ if len (errorOccurred ) > 0 && ! force {
48+ return errors .New (strings .Join (errorOccurred , "\n " ))
4949 }
5050
5151 return nil
@@ -81,9 +81,9 @@ func removeLocalMachine(hostName string, api libmachine.API) error {
8181 return api .Remove (hostName )
8282}
8383
84- func collectError (message string , force bool , errorOccured []string ) []string {
84+ func collectError (message string , force bool , errorOccurred []string ) []string {
8585 if force {
8686 log .Error (message )
8787 }
88- return append (errorOccured , message )
88+ return append (errorOccurred , message )
8989}
0 commit comments