Help us shape the future of Go! Take the 2026 Go Developer Survey

cmdutil

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cmdutil holds command-line behavior shared by the CLI and GUI executables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(w io.Writer, level string) *slog.Logger

NewLogger creates a text logger for a configured command log level.

func ReportError

func ReportError(stderr io.Writer, commandName string, err error) int

ReportError writes a command-prefixed error and returns the standard failure status.

func WithEnvironment

func WithEnvironment(environment []string, key, value string) []string

WithEnvironment replaces one environment variable, using Windows' case-insensitive key rules.

Types

This section is empty.

Jump to

Keyboard shortcuts

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