lol

package module
v0.0.0-...-73f0047 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 37 modules, 35 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

lolgopher

Rainbow Writer implementation for Golang

Based on https://github.com/busyloop/lolcat.

Proudly packaged with Golang dep

Installing

$ go get github.com/kris-nova/lolgopher
From Source
cd $GOPATH/src/github.com/kris-nova/lolgopher
go install .

Documentation

Index

Constants

View Source
const (
	DEFAULT_SPREAD = float64(3.0)
	DEFAULT_FREQ   = float64(0.1)
	DEFAULT_ORIGIN = 0
)
View Source
const (
	ColorModeTrueColor = iota
	ColorMode256
	ColorMode0
)

Variables

This section is empty.

Functions

func New0Colorer

func New0Colorer() colorer

func New256Colorer

func New256Colorer() colorer

func NewLolWriter

func NewLolWriter() io.Writer

NewLolWriter will return a new io.Writer with a default ColorMode of 256

func NewTruecolorLolWriter

func NewTruecolorLolWriter() io.Writer

NewTruecolorLolWriter will return a new io.Writer with a default ColorMode of truecolor

func Printf

func Printf(format string, a ...interface{}) (n int, err error)

func Println

func Println(a ...interface{}) (n int, err error)

Types

type Writer

type Writer struct {
	Output    io.Writer
	ColorMode int
	Freq      float64
	Spread    float64

	Origin int
	// contains filtered or unexported fields
}

LolWriter writes a little lol-er.

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Write will write a byte slice to the Writer

Directories

Path Synopsis
examples
banner command
print command

Jump to

Keyboard shortcuts

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