diff --git a/pkg/parsers/kernel/uname_linux.go b/pkg/parsers/kernel/uname_linux.go index 7d12fcbd9d..bb9b32641e 100644 --- a/pkg/parsers/kernel/uname_linux.go +++ b/pkg/parsers/kernel/uname_linux.go @@ -5,7 +5,7 @@ import ( ) // Utsname represents the system name structure. -// It is passthgrouh for syscall.Utsname in order to make it portable with +// It is passthrough for syscall.Utsname in order to make it portable with // other platforms where it is not available. type Utsname syscall.Utsname diff --git a/pkg/platform/architecture_freebsd.go b/pkg/platform/architecture_freebsd.go index 06dc9fe01b..5849eccc5a 100644 --- a/pkg/platform/architecture_freebsd.go +++ b/pkg/platform/architecture_freebsd.go @@ -4,7 +4,7 @@ import ( "os/exec" ) -// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …) func runtimeArchitecture() (string, error) { cmd := exec.Command("uname", "-m") machine, err := cmd.Output() diff --git a/pkg/platform/architecture_linux.go b/pkg/platform/architecture_linux.go index 30c58c78a1..2cdc2c5918 100644 --- a/pkg/platform/architecture_linux.go +++ b/pkg/platform/architecture_linux.go @@ -6,7 +6,7 @@ import ( "syscall" ) -// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …) func runtimeArchitecture() (string, error) { utsname := &syscall.Utsname{} if err := syscall.Uname(utsname); err != nil { diff --git a/pkg/platform/architecture_windows.go b/pkg/platform/architecture_windows.go index c72e1662e2..0dd8a2e416 100644 --- a/pkg/platform/architecture_windows.go +++ b/pkg/platform/architecture_windows.go @@ -36,7 +36,7 @@ const ( var sysinfo systeminfo -// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …) func runtimeArchitecture() (string, error) { syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0) switch sysinfo.wProcessorArchitecture { diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go index 59e2529546..e4b03122f4 100644 --- a/pkg/platform/platform.go +++ b/pkg/platform/platform.go @@ -17,7 +17,7 @@ func init() { var err error Architecture, err = runtimeArchitecture() if err != nil { - logrus.Errorf("Could no read system architecture info: %v", err) + logrus.Errorf("Could not read system architecture info: %v", err) } OSType = runtime.GOOS } diff --git a/pkg/reexec/reexec.go b/pkg/reexec/reexec.go index ceb98d25fc..c56671d919 100644 --- a/pkg/reexec/reexec.go +++ b/pkg/reexec/reexec.go @@ -12,7 +12,7 @@ var registeredInitializers = make(map[string]func()) // Register adds an initialization func under the specified name func Register(name string, initializer func()) { if _, exists := registeredInitializers[name]; exists { - panic(fmt.Sprintf("reexec func already registred under name %q", name)) + panic(fmt.Sprintf("reexec func already registered under name %q", name)) } registeredInitializers[name] = initializer diff --git a/pkg/registrar/registrar.go b/pkg/registrar/registrar.go index 8910197f29..1e75ee995b 100644 --- a/pkg/registrar/registrar.go +++ b/pkg/registrar/registrar.go @@ -15,7 +15,7 @@ var ( ErrNoSuchKey = errors.New("provided key does not exist") ) -// Registrar stores indexes a list of keys and their registered names as well as indexes names and the key that they are registred to +// Registrar stores indexes a list of keys and their registered names as well as indexes names and the key that they are registered to // Names must be unique. // Registrar is safe for concurrent access. type Registrar struct { diff --git a/pkg/stringid/stringid.go b/pkg/stringid/stringid.go index 02d2594e1a..161184ff8a 100644 --- a/pkg/stringid/stringid.go +++ b/pkg/stringid/stringid.go @@ -24,7 +24,7 @@ func IsShortID(id string) bool { // TruncateID returns a shorthand version of a string identifier for convenience. // A collision with other shorthands is very unlikely, but possible. // In case of a collision a lookup with TruncIndex.Get() will fail, and the caller -// will need to use a langer prefix, or the full-length Id. +// will need to use a longer prefix, or the full-length Id. func TruncateID(id string) string { if i := strings.IndexRune(id, ':'); i >= 0 { id = id[i+1:] @@ -57,7 +57,7 @@ func generateID(crypto bool) string { } } -// GenerateRandomID returns an unique id. +// GenerateRandomID returns a unique id. func GenerateRandomID() string { return generateID(true) diff --git a/pkg/stringutils/stringutils.go b/pkg/stringutils/stringutils.go index 41a0d2eb3a..7c00b972dd 100644 --- a/pkg/stringutils/stringutils.go +++ b/pkg/stringutils/stringutils.go @@ -20,7 +20,7 @@ func GenerateRandomAlphaOnlyString(n int) string { return string(b) } -// GenerateRandomASCIIString generates an ASCII random stirng with length n. +// GenerateRandomASCIIString generates an ASCII random string with length n. func GenerateRandomASCIIString(n int) string { chars := "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + @@ -74,7 +74,7 @@ func quote(word string, buf *bytes.Buffer) { } // ShellQuoteArguments takes a list of strings and escapes them so they will be -// handled right when passed as arguments to an program via a shell +// handled right when passed as arguments to a program via a shell func ShellQuoteArguments(args []string) string { var buf bytes.Buffer for i, arg := range args { diff --git a/pkg/system/umask.go b/pkg/system/umask.go index c670fcd758..3d0146b01a 100644 --- a/pkg/system/umask.go +++ b/pkg/system/umask.go @@ -7,7 +7,7 @@ import ( ) // Umask sets current process's file mode creation mask to newmask -// and return oldmask. +// and returns oldmask. func Umask(newmask int) (oldmask int, err error) { return syscall.Umask(newmask), nil }