diff --git a/unix/README.md b/unix/README.md index 7d3c060e1..6e08a76a7 100644 --- a/unix/README.md +++ b/unix/README.md @@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these into a common file for each OS. The merge is performed in the following steps: -1. Construct the set of common code that is idential in all architecture-specific files. +1. Construct the set of common code that is identical in all architecture-specific files. 2. Write this common code to the merged file. 3. Remove the common code from all architecture-specific files. diff --git a/unix/internal/mkmerge/mkmerge.go b/unix/internal/mkmerge/mkmerge.go index db8098c7f..52f1d12bb 100644 --- a/unix/internal/mkmerge/mkmerge.go +++ b/unix/internal/mkmerge/mkmerge.go @@ -427,7 +427,7 @@ func filterImports(fileSrc []byte) ([]byte, error) { } // merge extracts duplicate code from archFiles and merges it to mergeFile. -// 1. Construct commonSet: the set of code that is idential in all archFiles. +// 1. Construct commonSet: the set of code that is identical in all archFiles. // 2. Write the code in commonSet to mergedFile. // 3. Remove the commonSet code from all archFiles. func merge(mergedFile string, archFiles ...string) error { diff --git a/unix/mkpost.go b/unix/mkpost.go index c98a77d7f..ecacf010c 100644 --- a/unix/mkpost.go +++ b/unix/mkpost.go @@ -153,7 +153,7 @@ func main() { b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64")) // Remove fields that are added by glibc - // Note that this is unstable as the identifers are private. + // Note that this is unstable as the identifiers are private. removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`) b = removeFieldsRegex.ReplaceAll(b, []byte("_")) diff --git a/unix/mksyscall_zos_s390x.go b/unix/mksyscall_zos_s390x.go index f4fd945b3..12db6378a 100644 --- a/unix/mksyscall_zos_s390x.go +++ b/unix/mksyscall_zos_s390x.go @@ -374,7 +374,7 @@ func processStream(s *bufio.Scanner, asm, go1 *bufio.Writer, m *map[string]int64 } // Prepare arguments to Syscall. var args []string - var fargs []string // for call fowarding + var fargs []string // for call forwarding n := 0 for _, param := range in { p := parseParam(param) diff --git a/unix/syscall_aix.go b/unix/syscall_aix.go index 67ce6cef2..6f15ba1ea 100644 --- a/unix/syscall_aix.go +++ b/unix/syscall_aix.go @@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, var status _C_int var r Pid_t err = ERESTART - // AIX wait4 may return with ERESTART errno, while the processus is still + // AIX wait4 may return with ERESTART errno, while the process is still // active. for err == ERESTART { r, err = wait4(Pid_t(pid), &status, options, rusage) diff --git a/unix/syscall_solaris_test.go b/unix/syscall_solaris_test.go index a9d486a10..738733b21 100644 --- a/unix/syscall_solaris_test.go +++ b/unix/syscall_solaris_test.go @@ -207,7 +207,7 @@ func TestEventPortErrors(t *testing.T) { defer port.Close() err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, nil) if err == nil { - t.Errorf("unexpected success associating nonexistant file") + t.Errorf("unexpected success associating nonexistent file") } err = port.DissociatePath(path) if err == nil { diff --git a/unix/syscall_zos_test.go b/unix/syscall_zos_test.go index 2589e9ccd..c04f5a00f 100644 --- a/unix/syscall_zos_test.go +++ b/unix/syscall_zos_test.go @@ -3350,7 +3350,7 @@ func TestCreat(t *testing.T) { t.Fatal("Creat error: Cannot truncate file") } if string(b) != string(writeContent) { - t.Fatal("data missmatch: expect ", string(writeContent), " actual: ", string(b)) + t.Fatal("data mismatch: expect ", string(writeContent), " actual: ", string(b)) } // testing file create function @@ -3375,7 +3375,7 @@ func TestCreat(t *testing.T) { t.Fatal("Creat error: Cannot truncate file") } if string(b) != string(writeContent) { - t.Fatal("data missmatch: expect ", string(writeContent), " actual: ", string(b)) + t.Fatal("data mismatch: expect ", string(writeContent), " actual: ", string(b)) } } diff --git a/unix/sysvshm_unix_test.go b/unix/sysvshm_unix_test.go index cf234b83e..af90637c2 100644 --- a/unix/sysvshm_unix_test.go +++ b/unix/sysvshm_unix_test.go @@ -66,7 +66,7 @@ func TestSysvSharedMemory(t *testing.T) { } if runtime.GOOS == "zos" { - // The returned shared memory alligns with the pagesize. + // The returned shared memory aligns with the pagesize. // If pagesize is not 1024 bytes, the shared memory could be larger if len(b2) < 1024 { t.Fatalf("b1 len = %v, less than 1024", len(b2)) diff --git a/unix/xattr_test.go b/unix/xattr_test.go index a8be3ec5b..dfa208f16 100644 --- a/unix/xattr_test.go +++ b/unix/xattr_test.go @@ -119,7 +119,7 @@ func TestXattr(t *testing.T) { err = unix.Lsetxattr(s, xattrName, []byte(xattrDataSet), 0) if err != nil { - // Linux and Android doen't support xattrs on symlinks according + // Linux and Android doesn't support xattrs on symlinks according // to xattr(7), so just test that we get the proper error. if (runtime.GOOS != "linux" && runtime.GOOS != "android") || err != unix.EPERM { t.Fatalf("Lsetxattr: %v", err) diff --git a/windows/dll_windows.go b/windows/dll_windows.go index 115341fba..4e613cf63 100644 --- a/windows/dll_windows.go +++ b/windows/dll_windows.go @@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) { return d, nil } -// MustLoadDLL is like LoadDLL but panics if load operation failes. +// MustLoadDLL is like LoadDLL but panics if load operation fails. func MustLoadDLL(name string) *DLL { d, e := LoadDLL(name) if e != nil { diff --git a/windows/registry/registry_test.go b/windows/registry/registry_test.go index c227a5db6..6e7bec505 100644 --- a/windows/registry/registry_test.go +++ b/windows/registry/registry_test.go @@ -214,7 +214,7 @@ func enumerateValues(t *testing.T, k registry.Key) { } } for n, v := range haveNames { - t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v) + t.Errorf("value %s (%v) is found while enumerating, but has not been created", n, v) } } diff --git a/windows/svc/mgr/config.go b/windows/svc/mgr/config.go index a6d3e8a88..3c7ba08f5 100644 --- a/windows/svc/mgr/config.go +++ b/windows/svc/mgr/config.go @@ -63,7 +63,7 @@ func toStringSlice(ps *uint16) []string { return r } -// Config retrieves service s configuration paramteres. +// Config retrieves service s configuration parameters. func (s *Service) Config() (Config, error) { var p *windows.QUERY_SERVICE_CONFIG n := uint32(1024) diff --git a/windows/svc/mgr/recovery.go b/windows/svc/mgr/recovery.go index cdf880e13..ef2a68784 100644 --- a/windows/svc/mgr/recovery.go +++ b/windows/svc/mgr/recovery.go @@ -137,7 +137,7 @@ func (s *Service) RecoveryCommand() (string, error) { // SetRecoveryActionsOnNonCrashFailures sets the failure actions flag. If the // flag is set to false, recovery actions will only be performed if the service // terminates without reporting a status of SERVICE_STOPPED. If the flag is set -// to true, recovery actions are also perfomed if the service stops with a +// to true, recovery actions are also performed if the service stops with a // nonzero exit code. func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error { var setting windows.SERVICE_FAILURE_ACTIONS_FLAG @@ -151,7 +151,7 @@ func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error { // actions flag. If the flag is set to false, recovery actions will only be // performed if the service terminates without reporting a status of // SERVICE_STOPPED. If the flag is set to true, recovery actions are also -// perfomed if the service stops with a nonzero exit code. +// performed if the service stops with a nonzero exit code. func (s *Service) RecoveryActionsOnNonCrashFailures() (bool, error) { b, err := s.queryServiceConfig2(windows.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG) if err != nil { diff --git a/windows/syscall_windows_test.go b/windows/syscall_windows_test.go index b7703dfe1..1e686a4fd 100644 --- a/windows/syscall_windows_test.go +++ b/windows/syscall_windows_test.go @@ -830,9 +830,9 @@ func FuzzComposeCommandLine(f *testing.F) { // If args[0] contains a space or control character, we must quote it // to avoid it being split into multiple arguments. // If args[0] already starts with a quote character, we have no way - // to indicate that that character is part of the literal argument. + // to indicate that character is part of the literal argument. // In either case, if the string already contains a quote character - // we must avoid misinterpriting that character as the end of the + // we must avoid misinterpreting that character as the end of the // quoted argument string. // // Unfortunately, ComposeCommandLine does not return an error, so we