shell

package
v0.0.0-...-96647dd Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bash

func Bash(cfg *llm.Config) error

func Bytes

func Bytes(b []byte) []byte

Bytes removes ANSI escape sequences from the byte slice.

func Regexp

func Regexp() *regexp.Regexp

Regexp returns a copy of the underlying regexp.Regexp.

func String

func String(s string) string

String removes ANSI escape sequences from the string.

Types

type StripAnsiReader

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

StripAnsiReader wraps an io.Reader and removes ANSI escape sequences from its output.

func NewStripAnsiReader

func NewStripAnsiReader(r io.Reader) *StripAnsiReader

NewStripAnsiReader creates a new [Reader].

func (*StripAnsiReader) Read

func (r *StripAnsiReader) Read(p []byte) (n int, err error)

Read reads from the underlying reader and removes ANSI escape sequences.

type StripAnsiWriter

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

Writer wraps an io.Writer and removes ANSI escape sequences from its output.

func NewStripAnsiWriter

func NewStripAnsiWriter(w io.Writer) *StripAnsiWriter

NewStripAnsiWriter creates a new [Writer].

func (*StripAnsiWriter) Write

func (w *StripAnsiWriter) Write(p []byte) (n int, err error)

Write removes ANSI escape sequences and writes to the underlying writer.

Jump to

Keyboard shortcuts

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