log

package
v0.5.0 Latest Latest
Warning

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

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

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 added in v0.2.0

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 added in v0.4.0

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