utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize

func Colorize(text string, color string) string

Colorize adds colors to the output text.

Parameters:

  • text: The text to colorize.
  • color: The color to apply (red, green, yellow, blue, reset).

Returns:

  • The colorized text.

func Reexec

func Reexec(args []string) error

reexec restarts the process with the new arguments.

Parameters:

  • args: The new arguments for the process.

Returns:

  • An error, if any.

func SplitIgnore

func SplitIgnore(ignore string) []string

SplitIgnore splits the ignore string into a slice of strings.

Parameters:

  • ignore: The comma-separated ignore string.

Returns:

  • A slice of strings representing the split ignore list.

func StringToInt

func StringToInt(s string) (int, error)

StringToInt converts a string to an integer.

Parameters:

  • s: The string to convert.

Returns:

  • The integer value and an error, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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