Documentation
¶
Index ¶
- func Banner(version string, url string, hostFlag string, duration time.Duration)
- func BgGreen(s string) string
- func Blue(s string) string
- func Bold(s string) string
- func ClearProgress()
- func Cyan(s string) string
- func Dim(s string) string
- func DisableProgress()
- func DisplayPath(p string) string
- func Error(tag, format string, args ...any)
- func FormatLog(tag, msg string) string
- func Green(s string) string
- func Log(tag, format string, args ...any)
- func Print(block string)
- func Quiet() bool
- func Red(s string) string
- func Request(method, path string, status int, duration time.Duration)
- func SetProgress(tag, format string, args ...any)
- func SetQuiet(q bool)
- func Warn(tag, format string, args ...any)
- func WarnCount() int64
- func Yellow(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearProgress ¶ added in v1.0.0
func ClearProgress()
ClearProgress removes the in-place progress line from the terminal.
func DisableProgress ¶ added in v1.5.0
func DisableProgress()
DisableProgress turns the in-place progress line off for the rest of the process, e.g. when stdout carries machine-readable output.
func DisplayPath ¶ added in v1.5.0
DisplayPath shortens an absolute path to one relative to the working directory, with forward slashes, so terminals can link it. Relative paths and paths outside the working directory are returned unchanged.
func Log ¶
Log prints a tagged info log line: "15:04:05 [tag] message". It does nothing when output is quiet.
func Print ¶ added in v1.5.0
func Print(block string)
Print writes a preformatted block (one or more lines), keeping any active progress line intact below it. A missing trailing newline is added.
func Quiet ¶ added in v1.5.0
func Quiet() bool
Quiet reports whether informational output is silenced.
func SetProgress ¶ added in v1.0.0
SetProgress sets (or updates) the in-place progress line. The line is formatted with FormatLog and written with \r (no newline). Concurrent devlog.Log/Warn/Error/Request calls will clear it, write their own line, then redraw it, so interleaving is clean. It does nothing when stderr is not a terminal or output is quiet.
func SetQuiet ¶ added in v1.5.0
func SetQuiet(q bool)
SetQuiet silences informational output (Log and the progress line). Warnings and errors still print.
Types ¶
This section is empty.