Documentation ¶
Overview ¶
Package cap implements inspections of OS capabilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( CapWindows WindowsInterface CapTTY TTYInterface CapSymlink SymlinkInterface CapGit GitInterface )
Instance of interface, which can be overridden for test by mocking.
Functions ¶
func CanSymlink ¶
func CanSymlink() bool
CanSymlink indicates whether symlink is available for current OS.
func GetRlimitNoFile ¶
GetRlimitNoFile calls syscall to get RLIMIT_NOFILE.
func GitCanPushOptions ¶
func GitCanPushOptions() bool
GitCanPushOptions indicates whether git can sent push options.
Types ¶
type GitInterface ¶
type GitInterface interface {
GitCanPushOptions() bool
}
GitInterface is the interface to implement Git related capabilities.
type SymlinkInterface ¶
type SymlinkInterface interface {
CanSymlink() bool
}
SymlinkInterface is the interface to implement CanSymink(), which indicates symlink is available on current OS.
type TTYInterface ¶
type TTYInterface interface {
Isatty() bool
}
TTYInterface is the interface to implement Isatty(), which checks whether a valid terminal is attached.
type WindowsInterface ¶
type WindowsInterface interface {
IsWindows() bool
}
WindowsInterface is the interface to implement IsWindows(), which checks whether current OS is Windows.