utils

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorColor    = "\x1b[31m"
	SuccessColor  = "\x1b[32m"
	DefaultColor  = "\x1b[0m"
	TriangleColor = "\x1b[33m"
)

Variables

This section is empty.

Functions

func DownloadImage added in v1.2.1

func DownloadImage(url string) (*os.File, error)

DownloadImage downloads the image obtained from the net and saves it into a temporary file.

func IsValidUrl added in v1.2.1

func IsValidUrl(uri string) bool

IsValidUrl tests a string to determine if it is a well-structured url or not.

Types

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

Spinner initializes the process indicator.

func NewSpinner added in v1.2.1

func NewSpinner() *Spinner

NewSpinner instantiates a new Spinner struct.

func (*Spinner) Start

func (s *Spinner) Start(message string)

Start starts the process indicator.

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the process indicator.

Jump to

Keyboard shortcuts

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