v1.4.6 Latest Latest

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 13 Imported by: 2




This section is empty.


This section is empty.


func DetectFileContentType

func DetectFileContentType(fname string) (interface{}, error)

DetectFileContentType detects the file type by reading MIME type information of the file content.

func DownloadImage

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

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

func IsValidUrl

func IsValidUrl(uri string) bool

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


type ProgressIndicator

type ProgressIndicator struct {
	StopMsg string
	// contains filtered or unexported fields

ProgressIndicator initializes the progress indicator.

func NewSpinner added in v1.4.6

func NewSpinner(msg string, d time.Duration) *ProgressIndicator

NewSpinner instantiates a new progress indicator.

func (*ProgressIndicator) RestoreCursor

func (pi *ProgressIndicator) RestoreCursor()

RestoreCursor restores back the cursor visibility.

func (*ProgressIndicator) Start

func (pi *ProgressIndicator) Start()

Start starts the progress indicator.

func (*ProgressIndicator) Stop

func (pi *ProgressIndicator) Stop()

Stop stops the progress indicator.

Jump to

Keyboard shortcuts

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