err

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package err provides error and warning output functions for terminal display.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WarnFile

func WarnFile(cmd *cobra.Command, path string, err error)

WarnFile prints a non-fatal file operation warning to stderr.

Parameters:

  • cmd: Cobra command whose stderr stream receives the message. Nil is a no-op.
  • path: path of the file that caused the warning.
  • err: the underlying error.

func WithError

func WithError(cmd *cobra.Command, err error)

WithError writes a prefixed error message to the command's stderr stream.

Parameters:

  • cmd: Cobra command whose stderr stream receives the message. Nil is a no-op.
  • err: the error to display after the "Error: " prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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