package
0.0.0-20181212224424-397181f139d6
Repository: https://github.com/phase2/rig.git
Documentation: pkg.go.dev
# Functions
AbsJoin joins the two path segments, ensuring they form an absolute path.
AskYesNo asks the user a yes/no question Return true if they answered yes, false otherwise.
CaptureCommand is similar to PassthruCommand except it intercepts all output.
CheckForRigUpdate checks to see if an upgrdate to rig is available, if so, return a message.
Command creates a new Executor instance from the execution arguments.
ContainerRunning determines if the named container is live.
Convert takes a exec.Cmd pointer and wraps it in an executor object.
EscalatePrivilege attempts to gain administrative privilege @todo identify administrative escalation on Windows.
FileExists reports whether a file exists.
ForceStreamCommand sets up the output streams (and colors) to stream command output regardless of verbosity.
GetBridgeIP returns the IP address of the Docker bridge network gateway.
GetCurrentDockerVersion returns a Version based in the Docker semver.
GetDockerClientAPIVersion returns a Version for the docker client API version.
GetDockerServerAPIVersion returns a Version for the docker server API version.
GetDockerServerMinAPIVersion returns the minimum compatability version for the docker server.
GetExecutableDir returns the directory of this binary.
GetRawCurrentDockerVersion returns the entire semver string from the docker version cli.
GetUnisonMinorVersion will return the local Unison version to try to load a compatible unison image This function discovers a semver like 2.48.4 and return 2.48.
ImageOlderThan determines the age of the Docker Image and whether the image is older than the designated timestamp.
IndexOfString is a general utility function that can find the index of a value present in a string slice.
IndexOfSubstring is a variation on IndexOfString which checks to see if a given slice value matches our search string, or if that search string is a substring of the element.
IsLinux detects if we are running on the linux platform.
IsMac detects if we are running on the darwin platform.
IsWindows detects if we are running on the microsoft windows platform.
Logger returns the instance of the global logger.
LoggerInit initializes the global logger.
NotifyError send a notification for a failed command run.
NotifyInit initializes notification config.
NotifySuccess send a notification for a successful command run.
PassthruCommand is similar to ForceStreamCommand in that it will issue all output regardless of verbose mode.
PrintDebugHelp provides expanded troubleshooting help content for an error.
RemoveFile removes the designated file relative to the Working Directory.
RemoveFileGlob removes all files under the working directory that match the glob.
StreamCommand sets up the output streams (and colors) to stream command output if verbose is configured.
StringPad takes your string and returns it with the pad value repeatedly appended until it is the intended length.
SupportsNativeDocker determines if the runtime OS support docker natively, versus needing to run docker in a virtual machine.
TouchFile creates an empty file, usually for temporary use.
# Constants
Constants for virtualization drivers.
Constants for virtualization drivers.
Constants for virtualization drivers.
# Structs
Executor wraps exec.Cmd to allow consistent manipulation of executed commands.
NotifyConfig holds configuration for notification support.
RigLogger is the global logger object.
RigSpinner object wrapper to facilitate our spinner service as a different.