Documentation ¶
Index ¶
- func ConcatAlphaNumSplitChunks(chunks []string, concatChars string) string
- func GetSriovNumVFs(sysFSPath string) string
- func IsSriovPFwithVFs(pfpath string) bool
- func ReadDeviceDriver(path string) (string, error)
- func Split(str string, maxLength uint) []string
- func SplitAtLastAlphaNum(str string, maxLength uint, concatChars string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatAlphaNumSplitChunks ¶ added in v0.26.0
func GetSriovNumVFs ¶ added in v0.23.0
func IsSriovPFwithVFs ¶
IsSriovPFwithVFs returns true if the device with given pfpath has virtual functions, false otherwise.
func ReadDeviceDriver ¶ added in v0.30.0
Read driver for a device.
func Split ¶ added in v0.26.0
Split returns the given string cut to chunks of size up to maxLength size. maxLength refers to the max length of the strings in the returned slice. If the whole input string fits under maxLength, it is not split. Split("foo_bar", 4) returns []string{"foo_", "bar"}.
func SplitAtLastAlphaNum ¶ added in v0.26.0
SplitAtLastAlphaNum returns the given string cut to chunks of size up to maxLength. Difference to the Split above, this cuts the string at the last alpha numeric character (a-z0-9A-Z) and adds concatChars at the beginning of the next string chunk.
Types ¶
This section is empty.