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: 32

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

Jump to

Keyboard shortcuts

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