util

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorReset = "\033[0m"
	ColorGrey  = "\033[90m"
	ColorGreen = "\033[32m"
	ColorRed   = "\033[31m"
)

ANSI color codes

Functions

func Colorizef added in v0.10.2

func Colorizef(color string, format string, a ...any) string

Colorizef formats a string with the given color and resets the color afterwards

func Get

func Get(url string) ([]byte, map[string][]string, error)

Types

type Fetcher

type Fetcher struct{}

func NewFetcher

func NewFetcher() *Fetcher

func (*Fetcher) DownloadFile

func (*Fetcher) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error)

Jump to

Keyboard shortcuts

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