state

package
v0.0.0-...-22f786b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessage

func NewMessage(nick string, showNick bool, message string)

NewMessage stores an incoming message

func NickColor

func NickColor(nick string) termbox.Attribute

NickColor returns the randomly assigned color for a nick

func ReverseEachLine

func ReverseEachLine(callback func(int, ChatLine))

ReverseEachLine iterates each of the stored chat lines in reverse order with a counter

Types

type ChatLine

type ChatLine struct {
	Nick      string
	NickColor termbox.Attribute
	ShowNick  bool
	Line      string
}

ChatLine is the data for a line of chat Implemented as a doubly-linked list

Jump to

Keyboard shortcuts

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