internal

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package internal provides shared utilities for ctxweaver.

Package internal provides shared internal utilities.

Index

Constants

View Source
const (
	ColorReset  = "\033[0m"
	ColorCyan   = "\033[36m"
	ColorGreen  = "\033[32m"
	ColorYellow = "\033[33m"
	ColorRed    = "\033[31m"
	ColorDim    = "\033[2m"
)

ANSI color codes

Variables

This section is empty.

Functions

func Must

func Must[T any](val T, err error) T

Must panics if err is not nil, otherwise returns val. Use for initialization of embedded resources where failure is a build error.

func StderrColor added in v0.4.0

func StderrColor(color string) string

StderrColor returns the color code if stderr is a TTY, otherwise empty string.

func StdoutColor added in v0.4.0

func StdoutColor(color string) string

StdoutColor returns the color code if stdout is a TTY, otherwise empty string.

Types

This section is empty.

Directories

Path Synopsis
Package directive provides utilities for processing ctxweaver directives in comments.
Package directive provides utilities for processing ctxweaver directives in comments.
Package dstutil provides utilities for DST (Decorated Syntax Tree) manipulation.
Package dstutil provides utilities for DST (Decorated Syntax Tree) manipulation.

Jump to

Keyboard shortcuts

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