pluginutils

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatAlphaNumSplitChunks added in v0.26.0

func ConcatAlphaNumSplitChunks(chunks []string, concatChars string) string

func GetSriovNumVFs added in v0.23.0

func GetSriovNumVFs(sysFSPath string) string

func IsSriovPFwithVFs

func IsSriovPFwithVFs(pfpath string) bool

IsSriovPFwithVFs returns true if the device with given pfpath has virtual functions, false otherwise.

func Split added in v0.26.0

func Split(str string, maxLength uint) []string

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

func SplitAtLastAlphaNum(str string, maxLength uint, concatChars string) []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL