X Tutup
Skip to content

Commit bfd2546

Browse files
committed
fix typos in project scope
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
1 parent f694032 commit bfd2546

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

commands/rm.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

drivers/amazonec2/amazonec2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ func (d *Driver) checkPrereqs() error {
452452
return fmt.Errorf("There is no keypair with the name %s. Please verify the key name provided.", keyName)
453453
}
454454
if awsErr.Code() == keypairNotFoundCode && !keyShouldExist {
455-
// Not a real error for 'NotFound' since we're checking existance
455+
// Not a real error for 'NotFound' since we're checking existence
456456
}
457457
} else {
458458
return err

drivers/azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (d *Driver) Remove() error {
404404
}
405405

406406
// NOTE(ahmetalpbalkan):
407-
// - remove attemps are best effort and if a resource is already gone, we
407+
// - remove attempts are best effort and if a resource is already gone, we
408408
// continue removing other resources instead of failing.
409409
// - we can probably do a lot of parallelization here but a sequential
410410
// logic works fine too. If we were to detach the NIC from the VM and

drivers/azure/azureutil/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func validateToken(env azure.Environment, token *azure.ServicePrincipalToken) er
238238
return nil
239239
}
240240

241-
// getScope returns the API scope for authnetication tokens.
241+
// getScope returns the API scope for authentication tokens.
242242
func getScope(env azure.Environment) string {
243243
// for AzurePublicCloud (https://management.core.windows.net/), this old
244244
// Service Management scope covers both ASM and ARM.

drivers/azure/azureutil/powerstate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const (
4747

4848
// powerStateFromInstanceView reads the instance view response and extracts the
4949
// power state status (if exists) from there. If no status is found or an
50-
// unknown status has occured, returns Unknown.
50+
// unknown status has occurred, returns Unknown.
5151
func powerStateFromInstanceView(instanceView *compute.VirtualMachineInstanceView) VMPowerState {
5252
if instanceView == nil {
5353
log.Debug("Retrieved nil instance view.")

drivers/azure/azureutil/tenantid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/Azure/go-autorest/autorest/azure"
1616
)
1717

18-
// laodOrFindTenantID figures out the AAD tenant ID of the subscription by first
18+
// loadOrFindTenantID figures out the AAD tenant ID of the subscription by first
1919
// looking at the cache file, if not exists, makes a network call to load it and
2020
// cache it for future use.
2121
func loadOrFindTenantID(env azure.Environment, subscriptionID string) (string, error) {

drivers/exoscale/exoscale.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
8989
EnvVar: "EXOSCALE_AVAILABILITY_ZONE",
9090
Name: "exoscale-availability-zone",
9191
Value: defaultAvailabilityZone,
92-
Usage: "exoscale availibility zone",
92+
Usage: "exoscale availability zone",
9393
},
9494
mcnflag.StringFlag{
9595
EnvVar: "EXOSCALE_SSH_USER",

drivers/hyperv/hyperv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ func (d *Driver) generateDiskImage() (string, error) {
428428
diskImage := d.ResolveStorePath("disk.vhd")
429429
fixed := d.ResolveStorePath("fixed.vhd")
430430

431-
// Resizing vhds requires administrator priviledges
431+
// Resizing vhds requires administrator privileges
432432
// incase the user is only a hyper-v admin then create the disk at the target size to avoid resizing.
433433
isWindowsAdmin, err := isWindowsAdministrator()
434434
if err != nil {

drivers/vmwarefusion/fusion_darwin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func (d *Driver) Create() error {
319319
d.IPAddress = ip
320320

321321
// Do not execute the rest of boot2docker specific configuration
322-
// The uplaod of the public ssh key uses a ssh connection,
322+
// The upload of the public ssh key uses a ssh connection,
323323
// this works without installed vmware client tools
324324
if d.ConfigDriveURL != "" {
325325
var keyfh *os.File
@@ -564,7 +564,7 @@ func (d *Driver) getIPfromVmnetConfigurationFile(conffile, macaddr string) (stri
564564
continue
565565
}
566566

567-
// we are only in intressted in endings if we in a block. Otherwise we will count
567+
// we are only in interested in endings if we in a block. Otherwise we will count
568568
// ending of non host blocks as well
569569
if matches := hostend.FindStringSubmatch(line); blockdepth > 0 && matches != nil {
570570
blockdepth = blockdepth - 1

its/cli/ls_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestLs(t *testing.T) {
3636
ContainLine(1, "testmachine4")
3737
})
3838

39-
test.Run("ls: mutiple filters on label", func() {
39+
test.Run("ls: multiple filters on label", func() {
4040
test.Machine("ls --filter label=foo=bar --filter label=app=1").Should().Succeed().
4141
ContainLines(3).
4242
ContainLine(0, "NAME").

0 commit comments

Comments
 (0)
X Tutup