Documentation ¶
Index ¶
Constants ¶
const (
UNKNOWN = "unknown"
)
Variables ¶
This section is empty.
Functions ¶
func ConcatStrings ¶ added in v0.9.0
ConcatStrings concatenate strings in a larger one. This function addresses a very specific ghw use case. For a more general approach, just use strings.Join()
func ParseBool ¶ added in v0.11.0
Convert strings to bool using strconv.ParseBool() when recognized, otherwise use map lookup to convert strings like "Yes" "No" "On" "Off" to bool `ethtool` uses on, off, yes, no (upper and lower case) rather than true and false.
func SafeIntFromFile ¶
Reads a supplied filepath and converts the contents to an integer. Returns -1 if there were file permissions or existence errors or if the contents could not be successfully converted to an integer. In any error, a warning message is printed to STDERR and -1 is returned.
Types ¶
This section is empty.