Documentation ¶
Overview ¶
Package util provides utility functions for the cmd packages.
Index ¶
- Variables
- func DefaultLocalIP4() (net.IP, error)
- func Env(key string, defaultValue string) string
- func GetEnv(key string) (string, bool)
- func IsEnvironmentArgument(s string) bool
- func PromptForPasswordString(r io.Reader, format string, a ...interface{}) string
- func PromptForString(r io.Reader, format string, a ...interface{}) string
- func WaitForSuccessfulDial(network, address string, timeout, interval time.Duration, retries int) error
- type Environment
- type Mux
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNoDefaultIP = errors.New("no suitable IP address")
NoDefaultIP means no suitable non-loopback address can be found.
Functions ¶
func DefaultLocalIP4 ¶
DefaultLocalIP4 returns an IPv4 address that this host can be reached on. Will return NoDefaultIP if no suitable address can be found.
func IsEnvironmentArgument ¶ added in v0.3.1
func PromptForPasswordString ¶ added in v0.3.1
TODO not tested on other platforms
func PromptForString ¶ added in v0.3.1
Types ¶
type Environment ¶ added in v0.3.1
func ParseEnvironmentArguments ¶ added in v0.3.1
func ParseEnvironmentArguments(s []string) (Environment, []string, []error)
Click to show internal directories.
Click to hide internal directories.