message

package
v0.0.0-...-63333ca Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package message encapsulates the units emitted by the lexer.

Package message encapsulates the units emitted by the lexer.

Package message encapsulates the units emitted by the lexer.

Index

Constants

View Source
const ESC = 0x1b

Variables

View Source
var (
	CRLF = []byte{13, 10}
	EOT  = []byte{4}
)

Functions

func Deserialize

func Deserialize(b []byte) map[string]interface{}

func Log

func Log(format string, i ...interface{}) *message

func New

func New(cls Class, raw []byte) *message

New creates a new message of unparsed bytes.

func Pty

func Pty(pty string) []byte

func Raw

func Raw(raw []byte) *message

Raw creates a message from raw bytes.

func Run

func Run(cmd, env []string) []byte

func Serialize

func Serialize(m map[string]interface{}) []byte

func Started

func Started() []byte

func Status

func Status(status int) []byte

func Term

func Term(term string) []byte

func TerminalSize

func TerminalSize(ts *terminal.Size) []byte

Types

type Class

type Class rune

Class is a message's type.

const (
	End Class = unicode.MaxRune + iota
	Command
	Text
)

Message classes.

func (*Class) String

func (c *Class) String() string

String returns a string representation of Class. Useful for debugging.

type T

type T struct {
	// contains filtered or unexported fields
}

T (message) is a lexical item returned by the scanner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳