diff --git a/parsers/kernel/uname_linux.go b/parsers/kernel/uname_linux.go index 7d12fcb..bb9b326 100644 --- a/parsers/kernel/uname_linux.go +++ b/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/platform/architecture_freebsd.go b/platform/architecture_freebsd.go index 06dc9fe..5849ecc 100644 --- a/platform/architecture_freebsd.go +++ b/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/platform/architecture_linux.go b/platform/architecture_linux.go index 30c58c7..2cdc2c5 100644 --- a/platform/architecture_linux.go +++ b/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/platform/architecture_windows.go b/platform/architecture_windows.go index c72e166..0dd8a2e 100644 --- a/platform/architecture_windows.go +++ b/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/platform/platform.go b/platform/platform.go index 59e2529..e4b0312 100644 --- a/platform/platform.go +++ b/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/reexec/reexec.go b/reexec/reexec.go index ceb98d2..c56671d 100644 --- a/reexec/reexec.go +++ b/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/registrar/registrar.go b/registrar/registrar.go index 8910197..1e75ee9 100644 --- a/registrar/registrar.go +++ b/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/stringid/stringid.go b/stringid/stringid.go index 02d2594..161184f 100644 --- a/stringid/stringid.go +++ b/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/stringutils/stringutils.go b/stringutils/stringutils.go index 41a0d2e..7c00b97 100644 --- a/stringutils/stringutils.go +++ b/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/system/umask.go b/system/umask.go index c670fcd..3d0146b 100644 --- a/system/umask.go +++ b/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 }