ancli

package
v1.33.13 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 10 Imported by: 11

Documentation

Overview

ancli is a simple suite of reusable ansi cli functions It's like ansi cli, and the "c" sounds like "si", so it becomes an"si"li? get it? It's very funny.

Index

Constants

View Source
const (
	RED colorCode = iota + 31
	GREEN
	YELLOW
	BLUE
	MAGENTA
	CYAN
)

Variables

View Source
var (
	UseColor = os.Getenv("NO_COLOR") != "true"

	Newline = false || strings.ToLower(os.Getenv("ANCLI_NEWLINE")) == "true"
	SlogIt  = false

	OutMu  = sync.Mutex{}
	ErrMut = sync.Mutex{}
	Silent = misc.Truthy(os.Getenv("SILENT"))
)

Functions

func ColoredMessage added in v1.3.6

func ColoredMessage(cc colorCode, msg string) string

func Errf added in v1.3.34

func Errf(msg string, a ...any)

func Noticef added in v1.3.34

func Noticef(msg string, a ...any)

func Okf added in v1.3.34

func Okf(msg string, a ...any)

func PrintErr added in v1.2.1

func PrintErr(msg string)

func PrintNotice added in v1.3.13

func PrintNotice(msg string)

func PrintOK added in v1.2.1

func PrintOK(msg string)

func PrintWarn added in v1.2.1

func PrintWarn(msg string)

func PrintfErr added in v1.3.13

func PrintfErr(msg string, a ...any)

func PrintfNotice added in v1.3.13

func PrintfNotice(msg string, a ...any)

func PrintfOK added in v1.3.13

func PrintfOK(msg string, a ...any)

func PrintfWarn added in v1.3.13

func PrintfWarn(msg string, a ...any)

func SetupSlog added in v1.3.25

func SetupSlog()

func Warnf added in v1.3.34

func Warnf(msg string, a ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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