console

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package console provides simple colored console output utilities.

This package offers basic ANSI color support for terminal output with success (green) and failure (red) message formatting. It supports disabling colors via the NoColor flag for non-TTY environments or user preference.

Usage

Print colored messages to stdout:

console.PrintSuccess("Version bumped successfully")
console.PrintFailure("Failed to read version file")

Color Control

Disable colors programmatically:

console.SetNoColor(true)

When NoColor is true, messages are printed without ANSI escape codes.

Note

For more sophisticated terminal styling with lipgloss support, use the printer package instead. This package is intended for simple, lightweight color output without external dependencies beyond the standard library.

Index

Constants

This section is empty.

Variables

View Source
var NoColor bool

Functions

func PrintFailure

func PrintFailure(msg string)

func PrintSuccess

func PrintSuccess(msg string)

func SetNoColor

func SetNoColor(v bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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