log

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package log prints install progress, preserving the "[step]: name" output the shell scripts produced so existing CI log scrapers keep working.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elapsed

func Elapsed(start time.Time, label string)

Elapsed prints how long an operation took, as "(label took 1.234s)", so a slow install can be attributed to a step from its log alone. Use it as `defer log.Elapsed(time.Now(), "ko resolve")`: the start time is captured when the defer statement runs.

func Infof

func Infof(format string, args ...any)

Infof prints an unadorned progress line.

func SetOutput

func SetOutput(w io.Writer)

SetOutput redirects progress output, for tests.

func Step

func Step(msg string)

Step announces a named install step. It takes a plain string rather than a format because most step names are computed (a demo name plus a suffix, a namespace/name pair), and a stray % in one of those should not be read as a verb.

func Stepf

func Stepf(format string, args ...any)

Stepf announces a formatted install step.

func Warnf

func Warnf(format string, args ...any)

Warnf prints a warning to stderr.

func Writer

func Writer() io.Writer

Writer is the destination progress output goes to, for callers that render several lines themselves rather than one step at a time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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