util

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEmptyValue

func DeleteEmptyValue(s []string) []string

DeleteEmptyValue removes empty strings from a slice and returns a new slice.

func IsFileExist

func IsFileExist(file string) bool

IsFileExist checks if a file exists at the given path.

func PrepareDir

func PrepareDir(path string) error

PrepareDir ensures that the specified directory path exists. If the directory does not exist, it attempts to create it.

func ProgressBar

func ProgressBar(maxBytes int64, description ...string) *progressbar.ProgressBar

ProgressBar returns a new progress bar. copy from progressbar.DefaultBytes, add OptionUseANSICodes(true) ISSUE: https://github.com/schollz/progressbar/issues/102

func SetIPProgressBar

func SetIPProgressBar(bar *progressbar.ProgressBar, ip net.IP)

SetIPProgressBar sets the ip to the progress bar. FIXME Less effective, characteristics temporarily deactivated (´・ω・`)

Types

This section is empty.

Jump to

Keyboard shortcuts

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