package terminal
import "github.com/gohugoio/hugo/common/terminal"
Package terminal contains helper for the terminal, such as coloring output.
Index ¶
- func Error(s string) string
- func IsTerminal(f *os.File) bool
- func Notice(s string) string
- func PrintANSIColors(f *os.File) bool
- func Warning(s string) string
Functions ¶
func Error ¶
Error colorizes the string in a colour that grabs attention.
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal and the TERM environment variable isn't a dumb one.
func Notice ¶
Notice colorizes the string in a noticeable color.
func PrintANSIColors ¶
PrintANSIColors returns false if NO_COLOR env variable is set, else IsTerminal(f).
func Warning ¶
Warning colorizes the string in a colour that warns.
Source Files ¶
- Version
- v0.144.2 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 13 hours ago –
Tools for package owners.