Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectContentType ¶ added in v1.5.0
DetectContentType detects the file type by reading MIME type information of the file content.
func DownloadImage ¶
DownloadImage downloads the image from the internet and saves it into a temporary file.
func IsValidUrl ¶
IsValidUrl tests a string to determine if it is a well-structured url or not.
Types ¶
type ProcessIndicator ¶ added in v1.5.0
type ProcessIndicator struct {
StopMsg string
// contains filtered or unexported fields
}
ProcessIndicator initializes the progress indicator.
func NewIndicator ¶ added in v1.5.0
func NewIndicator(msg string, d time.Duration) *ProcessIndicator
NewIndicator instantiates a new progress indicator.
func (*ProcessIndicator) RestoreCursor ¶ added in v1.5.0
func (pi *ProcessIndicator) RestoreCursor()
RestoreCursor restores back the cursor visibility.
func (*ProcessIndicator) Start ¶ added in v1.5.0
func (pi *ProcessIndicator) Start()
Start starts the progress indicator.
func (*ProcessIndicator) Stop ¶ added in v1.5.0
func (pi *ProcessIndicator) Stop()
Stop stops the progress indicator.