Skip to content

renanrs/lspinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lspinner

An easy and light weight spinner to use in your go console applications.

Installing

Using Lspinner is easy. First, use go get to install the latest version of the library. This command will install the lspinner along with the library and its dependencies:

go get -u github.com/renanrs/lspinner

Next, include Lspinner in your application:

import "github.com/renanrs/lspinner"

Getting Started

In your console application, initialize Lspinner, use Wait function to show the spinner and wait message and user Stop function to erase the message.

package main

import (
	"time"

	"github.com/renanrs/lspinner"
)

func main() {
	spinner := lspinner.New(lspinner.Options{})
	spinner.Wait()
  // code to wait the execution

	time.Sleep(time.Second * 5)
	spinner.Stop()
}

About

light weight spinner for go console applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published