term

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHAR_UNSPECIFIED    = 0
	CHAR_COLOR_SEQUENCE = 1
	CHAR_CONTROL        = 2
)

Variables

This section is empty.

Functions

func Fprintf

func Fprintf(w io.Writer, format string, a ...any) (int, error)

func GetSize

func GetSize(fd int) (width, height int, err error)

func IsCygwinTerminal

func IsCygwinTerminal(fd uintptr) bool

func IsNativeTerminal

func IsNativeTerminal(fd uintptr) bool

func IsTerminal

func IsTerminal(fd uintptr) bool

func SanitizeANSI

func SanitizeANSI(content string, allowColor bool) string

func SanitizedF

func SanitizedF(format string, a ...any) (int, error)

func StripANSI

func StripANSI(s string) string

Types

type Level

type Level int

Level color level

const (
	LevelNone Level = iota
	Level256
	Level16M
)
var (
	StderrLevel Level
	StdoutLevel Level
)

func (Level) SupportColor

func (level Level) SupportColor() bool

Jump to

Keyboard shortcuts

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