diff --git a/pkg/reexec/command_linux.go b/pkg/reexec/command_linux.go index 3c3a73a9d5..34ae2a9dcd 100644 --- a/pkg/reexec/command_linux.go +++ b/pkg/reexec/command_linux.go @@ -13,7 +13,7 @@ func Self() string { return "/proc/self/exe" } -// Command returns *exec.Cmd which have Path as current binary. Also it setting +// Command returns *exec.Cmd which has Path as current binary. Also it setting // SysProcAttr.Pdeathsig to SIGTERM. // This will use the in-memory version (/proc/self/exe) of the current binary, // it is thus safe to delete or replace the on-disk binary (os.Args[0]). diff --git a/pkg/reexec/command_unix.go b/pkg/reexec/command_unix.go index b70edcb316..778a720e3b 100644 --- a/pkg/reexec/command_unix.go +++ b/pkg/reexec/command_unix.go @@ -1,4 +1,4 @@ -// +build freebsd solaris +// +build freebsd solaris darwin package reexec @@ -12,7 +12,7 @@ func Self() string { return naiveSelf() } -// Command returns *exec.Cmd which have Path as current binary. +// Command returns *exec.Cmd which has Path as current binary. // For example if current binary is "docker" at "/usr/bin/", then cmd.Path will // be set to "/usr/bin/docker". func Command(args ...string) *exec.Cmd { diff --git a/pkg/reexec/command_unsupported.go b/pkg/reexec/command_unsupported.go index 9aed004e86..76edd82427 100644 --- a/pkg/reexec/command_unsupported.go +++ b/pkg/reexec/command_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!freebsd,!solaris +// +build !linux,!windows,!freebsd,!solaris,!darwin package reexec @@ -6,7 +6,7 @@ import ( "os/exec" ) -// Command is unsupported on operating systems apart from Linux and Windows. +// Command is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin. func Command(args ...string) *exec.Cmd { return nil } diff --git a/pkg/reexec/command_windows.go b/pkg/reexec/command_windows.go index 8d65e0ae1a..ca871c4227 100644 --- a/pkg/reexec/command_windows.go +++ b/pkg/reexec/command_windows.go @@ -12,7 +12,7 @@ func Self() string { return naiveSelf() } -// Command returns *exec.Cmd which have Path as current binary. +// Command returns *exec.Cmd which has Path as current binary. // For example if current binary is "docker.exe" at "C:\", then cmd.Path will // be set to "C:\docker.exe". func Command(args ...string) *exec.Cmd { diff --git a/pkg/sysinfo/sysinfo_freebsd.go b/pkg/sysinfo/sysinfo_freebsd.go deleted file mode 100644 index 22ae0d95a9..0000000000 --- a/pkg/sysinfo/sysinfo_freebsd.go +++ /dev/null @@ -1,7 +0,0 @@ -package sysinfo - -// New returns an empty SysInfo for freebsd for now. -func New(quiet bool) *SysInfo { - sysInfo := &SysInfo{} - return sysInfo -} diff --git a/pkg/sysinfo/sysinfo_unix.go b/pkg/sysinfo/sysinfo_unix.go new file mode 100644 index 0000000000..45f3ef1c65 --- /dev/null +++ b/pkg/sysinfo/sysinfo_unix.go @@ -0,0 +1,9 @@ +// +build !linux,!solaris,!windows + +package sysinfo + +// New returns an empty SysInfo for non linux nor solaris for now. +func New(quiet bool) *SysInfo { + sysInfo := &SysInfo{} + return sysInfo +} diff --git a/pkg/sysinfo/sysinfo_windows.go b/pkg/sysinfo/sysinfo_windows.go index 8889318c39..4e6255bc59 100644 --- a/pkg/sysinfo/sysinfo_windows.go +++ b/pkg/sysinfo/sysinfo_windows.go @@ -1,3 +1,5 @@ +// +build windows + package sysinfo // New returns an empty SysInfo for windows for now. diff --git a/pkg/system/utimes_darwin.go b/pkg/system/utimes_darwin.go deleted file mode 100644 index 0a16197544..0000000000 --- a/pkg/system/utimes_darwin.go +++ /dev/null @@ -1,8 +0,0 @@ -package system - -import "syscall" - -// LUtimesNano is not supported by darwin platform. -func LUtimesNano(path string, ts []syscall.Timespec) error { - return ErrNotSupportedPlatform -} diff --git a/pkg/system/utimes_unsupported.go b/pkg/system/utimes_unsupported.go index 50c3a04364..139714544d 100644 --- a/pkg/system/utimes_unsupported.go +++ b/pkg/system/utimes_unsupported.go @@ -1,10 +1,10 @@ -// +build !linux,!freebsd,!darwin +// +build !linux,!freebsd package system import "syscall" -// LUtimesNano is not supported on platforms other than linux, freebsd and darwin. +// LUtimesNano is only supported on linux and freebsd. func LUtimesNano(path string, ts []syscall.Timespec) error { return ErrNotSupportedPlatform } diff --git a/pkg/term/term.go b/pkg/term/term.go index a769fd349f..fe59faa949 100644 --- a/pkg/term/term.go +++ b/pkg/term/term.go @@ -1,6 +1,6 @@ // +build !windows -// Package term provides provides structures and helper functions to work with +// Package term provides structures and helper functions to work with // terminal (state, sizes). package term