fix some typo spotted with codespell (#1278)

Fixed spelling typos on logs, comments and command help text
This commit is contained in:
Fabio Fantoni
2023-11-01 17:11:16 +01:00
committed by GitHub
parent 8843784312
commit c99ae6f009
38 changed files with 57 additions and 57 deletions

View File

@@ -282,7 +282,7 @@ func (a *xorMapped) closeWaiters() {
// just exit
break
default:
// notify tha twe have a new addr
// notify that twe have a new addr
close(a.waitAddrReceived)
}
}

View File

@@ -59,7 +59,7 @@ func TestDeviceWrapperRead(t *testing.T) {
n, err := wrapped.Read(bufs, sizes, offset)
if err != nil {
t.Errorf("unexpeted error: %v", err)
t.Errorf("unexpected error: %v", err)
return
}
if n != 1 {
@@ -105,7 +105,7 @@ func TestDeviceWrapperRead(t *testing.T) {
n, err := wrapped.Write(bufs, 0)
if err != nil {
t.Errorf("unexpeted error: %v", err)
t.Errorf("unexpected error: %v", err)
return
}
if n != 1 {
@@ -154,7 +154,7 @@ func TestDeviceWrapperRead(t *testing.T) {
n, err := wrapped.Write(bufs, 0)
if err != nil {
t.Errorf("unexpeted error: %v", err)
t.Errorf("unexpected error: %v", err)
return
}
if n != 0 {
@@ -211,7 +211,7 @@ func TestDeviceWrapperRead(t *testing.T) {
n, err := wrapped.Read(bufs, sizes, offset)
if err != nil {
t.Errorf("unexpeted error: %v", err)
t.Errorf("unexpected error: %v", err)
return
}
if n != 0 {

View File

@@ -13,7 +13,7 @@ import (
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
// keep darwin compability
// keep darwin compatibility
const (
WgIntNumber = 2000
)

View File

@@ -110,7 +110,7 @@ func canCreateFakeWireGuardInterface() bool {
// We willingly try to create a device with an invalid
// MTU here as the validation of the MTU will be performed after
// the validation of the link kind and hence allows us to check
// for the existance of the wireguard module without actually
// for the existence of the wireguard module without actually
// creating a link.
//
// As a side-effect, this will also let the kernel lazy-load
@@ -271,12 +271,12 @@ func moduleStatus(name string) (status, error) {
func loadModuleWithDependencies(name, path string) error {
deps, err := getModuleDependencies(name)
if err != nil {
return fmt.Errorf("couldn't load list of module %s dependecies", name)
return fmt.Errorf("couldn't load list of module %s dependencies", name)
}
for _, dep := range deps {
err = loadModule(dep.name, dep.path)
if err != nil {
return fmt.Errorf("couldn't load dependecy module %s for %s", dep.name, name)
return fmt.Errorf("couldn't load dependency module %s for %s", dep.name, name)
}
}
return loadModule(name, path)

View File

@@ -20,7 +20,7 @@ func (c *tunDevice) Create() error {
func (c *tunDevice) assignAddr() error {
cmd := exec.Command("ifconfig", c.name, "inet", c.address.IP.String(), c.address.IP.String())
if out, err := cmd.CombinedOutput(); err != nil {
log.Infof(`adding addreess command "%v" failed with output %s and error: `, cmd.String(), out)
log.Infof(`adding address command "%v" failed with output %s and error: `, cmd.String(), out)
return err
}