utils

package
v0.0.2-0...-d22e30f Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Black   = "\033[1;30m%s\033[0m"
	Red     = "\033[1;31m%s\033[0m"
	Green   = "\033[1;32m%s\033[0m"
	Yellow  = "\033[1;33m%s\033[0m"
	Blue    = "\033[1;34m%s\033[0m"
	Magenta = "\033[1;35m%s\033[0m"
	Cyan    = "\033[1;36m%s\033[0m"
	White   = "\033[1;37m%s\033[0m"
)

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, containsValue string) bool

func Do

func Do(req *http.Request, client *http.Client) (*http.Response, error)

Do - When err is nil, resp always contains a non-nil resp.Body. Caller should close resp.Body when done reading from it.

func EqualStringSlices

func EqualStringSlices(slice1 []string, slice2 []string) bool

func Get

func Get(url string, client *http.Client) (*http.Response, error)

Get - When err is nil, resp always contains a non-nil resp.Body. Caller should close resp.Body when done reading from it.

func OpenBrowser

func OpenBrowser(url string)

func Post

func Post(url, contentType string, body io.Reader, client *http.Client, licenseKey string) (*http.Response, error)

Post - When err is nil, resp always contains a non-nil resp.Body. Caller should close resp.Body when done reading from it.

func PrettyYaml

func PrettyYaml(data interface{}) (result string, err error)

func UnescapeUnicodeCharacters

func UnescapeUnicodeCharacters(raw string) string

func Unique

func Unique(slice []string) []string

func WaitForTermination

func WaitForTermination(ctx context.Context, cancel context.CancelFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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