utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(value string) string

Blue converts a string to blue color in the console with bold text.

func CliError

func CliError(msg string, args ...interface{})

CliError handles all error messages in the CLI.

func CliInfo

func CliInfo(msg string, args ...interface{})

CliInfo handles all informational messages in the CLI.

func CliWarning

func CliWarning(msg string, args ...interface{})

CliWarning handles all warning messages in the CLI.

func CreatePaginationParams

func CreatePaginationParams(page, pageSize int) string

func Green

func Green(value string) string

Green converts a string to green color in the console with bold text.

func PrintHeader

func PrintHeader(header string)

func PrintJson

func PrintJson(body []byte)

func PrintTable

func PrintTable(slice interface{})

func PromptForInput

func PromptForInput(promptText string) string

func ReadFileFromPath

func ReadFileFromPath(filePath string) ([]byte, error)

func Red

func Red(value string) string

Red converts a string to red color in the console with bold text.

func RemovePrefixBeforeAPI added in v0.0.2

func RemovePrefixBeforeAPI(url string) string

func SplitAndParseInts

func SplitAndParseInts(input string) []int

func TimeAgo added in v0.0.2

func TimeAgo(t time.Time) string

func TruncateString added in v0.0.2

func TruncateString(str string, num int) string

func Yellow

func Yellow(value string) string

Yellow converts a string to yellow color in the console with bold text.

Types

This section is empty.

Jump to

Keyboard shortcuts

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