Skip to content

mattn/_gopher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gopher

Gopher renders little `( ◔ ౪◔)´ to the command line.

Use gopher just for pure fun or more meaningful as a loading spinner.

CI Status

Installation

Install gopher with a simple

$ go get github.com/toashd/gopher

Usage

Import the gopher package

import "github.com/toashd/gopher"

Create a new gopher

g := gopher.New()
g.Start()                       // Start the gopher

g.Activity = gopher.Loving      // Change the gophers activity. Default is Waiting.
g.Color = gopher.Magenta        // Change the gophers color. Default is White.
g.Prefix = g.Activity.String()  // Add prefix text
g.Suffix = "golang"             // Add suffix text

time.Sleep(4 * time.Second)     // Run for some time to simulate some serious work

g.Stop()                        // Stop the gopher

To simply print a gopher use

fmt.Println(g)

Gopher currently supports four different gopher activities: Waiting, Wondering, Boring, and Loving.

Want to see gophers in action, checkout the examples or build your own!

Contribution

Please feel free to suggest any kind of improvements, refactorings or just more funny gopher activities. Get in touch, file an issue, fork and submit a pull requests.

Get in touch

Tobias Schmid, @toashd

License

Gopher is available under the MIT license. See the LICENSE file for more info.

About

Little `( ◔ ౪◔)´ for the command line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • Go 100.0%