term

package
v0.1.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package term says whether a file is a terminal a person reads, and whether it shows colours, for the console lines a logger writes beside the store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colors

func Colors(f *os.File) bool

Colors says whether f shows ANSI colours: a terminal, without NO_COLOR (no-color.org) or a TERM of dumb. On Windows it asks the console to read escape sequences, which a console from before Windows Terminal prints as text unless asked.

func IsTerminal

func IsTerminal(f *os.File) bool

IsTerminal says whether f is a character device, a console or a terminal, rather than a pipe or a file. The null device is one too, and nobody reads what goes there.

Types

This section is empty.

Jump to

Keyboard shortcuts

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