terminal

package
Version: v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package terminal contains helper for the terminal, such as coloring output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(s string) string

Error colorizes the string in a colour that grabs attention.

func IsTerminal

func IsTerminal(f *os.File) bool

IsTerminal return true if the file descriptor is terminal and the TERM environment variable isn't a dumb one.

func Notice

func Notice(s string) string

Notice colorizes the string in a noticeable color.

func PrintANSIColors added in v0.101.0

func PrintANSIColors(f *os.File) bool

PrintANSIColors returns false if NO_COLOR env variable is set, else IsTerminal(f).

func Warning

func Warning(s string) string

Warning colorizes the string in a colour that warns.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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