package formatter

import "github.com/onsi/ginkgo/v2/formatter"

Index

Constants

const COLS = 80

Variables

var ColorableStdErr = newColorable(os.Stderr)
var ColorableStdOut = newColorable(os.Stdout)

ColorableStdOut and ColorableStdErr enable color output support on Windows

var SingletonFormatter = New(ColorModeTerminal)

Functions

func F

func F(format string, args ...any) string

func Fi

func Fi(indentation uint, format string, args ...any) string

func Fiw

func Fiw(indentation uint, maxWidth uint, format string, args ...any) string

Types

type ColorMode

type ColorMode uint8
const (
	ColorModeNone ColorMode = iota
	ColorModeTerminal
	ColorModePassthrough
)

type Formatter

type Formatter struct {
	ColorMode ColorMode
	// contains filtered or unexported fields
}

func New

func New(colorMode ColorMode) Formatter

func NewWithNoColorBool

func NewWithNoColorBool(noColor bool) Formatter

func (Formatter) CycleJoin

func (f Formatter) CycleJoin(elements []string, joiner string, cycle []string) string

func (Formatter) F

func (f Formatter) F(format string, args ...any) string

func (Formatter) Fi

func (f Formatter) Fi(indentation uint, format string, args ...any) string

func (Formatter) Fiw

func (f Formatter) Fiw(indentation uint, maxWidth uint, format string, args ...any) string

Source Files

colorable_others.go formatter.go

Version
v2.23.4 (latest)
Published
Apr 6, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
12 hours ago

Tools for package owners.