prnt

package
v0.0.0-...-852c197 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printf

func Printf(msg string, args ...any)

func Println

func Println(args ...any)

func SetPrinter

func SetPrinter(p Printer)

Types

type DualWriter

type DualWriter struct {
	// contains filtered or unexported fields
}

func NewDualWriter

func NewDualWriter(
	printfCB func(string, ...any) (int, error),
	printlnCB func(...any) (int, error),
) *DualWriter

func (*DualWriter) Printf

func (dw *DualWriter) Printf(msg string, args ...any)

func (*DualWriter) Println

func (dw *DualWriter) Println(args ...any)

type Printer

type Printer interface {
	Printf(msg string, args ...any)
	Println(args ...any)
}

func CurrentPrinter

func CurrentPrinter() Printer

type StandardPrinter

type StandardPrinter struct{}

func (*StandardPrinter) Printf

func (sp *StandardPrinter) Printf(msg string, args ...any)

func (*StandardPrinter) Println

func (sp *StandardPrinter) Println(args ...any)

Jump to

Keyboard shortcuts

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