Documentation ¶
Overview ¶
Package utils contains all the utility functions used by nephele
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorString ¶ added in v0.5.0
ColorString wraps the provided string with appropriate color according to its state and returns the colored string. It should be used only for highlighting instance states and not recommended for any other purpose.
func GetProgressBar ¶ added in v0.2.0
func GetProgressBar(totalSize int) *pb.ProgressBar
GetProgressBar returns an instance of ProgressBar with predefined config.
func WordWrap ¶ added in v0.2.1
WordWrap wraps the given string according to the provided parts with the separator sep and returns the wrapped string if and only if the given string has the character `.` or `-`. Currently WordWrap is very naive and it'll break the string if the separator position is greater than the half length of the provided string. It has been written solely for the purpose of wrapping text for rendering in table writer and not recommended for normal use.
Types ¶
This section is empty.