Documentation ¶
Index ¶
- Variables
- func FindUserHome() string
- func FormatIPAndLocation(ip string) string
- func IsInteractiveConnection() bool
- func ParseGitCommand(command string) (typ string, repo string)
- func PrintMessage(message string, args ...interface{})
- func PublicKeyFingerprint(pubkey string) (string, string)
- func Rfc4716Hex(data []byte) string
- func RunCommand(command ...string) string
- func RunShell()
- func RunShellFromPath(shellPath string)
- func RunShellFromPathWithArgs(shellPath string, shellArgs []string)
- type GeoIP
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// GeoIPUnknown is returned when the city or country name can't be resolved.
GeoIPUnknown = "<unknown>"
)
Functions ¶
func FindUserHome ¶
func FindUserHome() string
FindUserHome returns the home directory of the current user.
func FormatIPAndLocation ¶
FormatIPAndLocation returns the ip with geo location for the given ip.
func IsInteractiveConnection ¶
func IsInteractiveConnection() bool
IsInteractiveConnection returns true if the terminal is interactive
func ParseGitCommand ¶
ParseGitCommand rturns the type of the operation and the repo given a git command
func PrintMessage ¶
func PrintMessage(message string, args ...interface{})
PrintMessage prints a message only if the terminal is interactive, otherwise the message is ignored.
func PublicKeyFingerprint ¶
PublicKeyFingerprint Helper function to get the fingerprint of a SSH public key
func Rfc4716Hex ¶
Rfc4716Hex returns the data in hex format separated by ":"
func RunCommand ¶
RunCommand runns the given command and arguments
func RunShellFromPathWithArgs ¶
RunShellFromPathWithArgs runs a shell given the given arguments
Types ¶
Click to show internal directories.
Click to hide internal directories.