printer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

printer package provides utility for displaying messages to users.

Index

Constants

This section is empty.

Variables

View Source
var (
	Stderr = NewP(os.Stderr)
	Stdout = NewP(os.Stdout)
	Color  = aurora.NewAurora(true)
)

Functions

func Debugf

func Debugf(fmtString string, args ...interface{})

func Debugln

func Debugln(args ...interface{})

func Errorf

func Errorf(fmtString string, args ...interface{})

func Errorln

func Errorln(args ...interface{})

func Infof

func Infof(fmtString string, args ...interface{})

func Infoln

func Infoln(args ...interface{})

func RawOutput added in v0.17.4

func RawOutput(args ...interface{})

func SwitchToJSON added in v0.17.4

func SwitchToJSON()

func SwitchToPlain added in v0.17.4

func SwitchToPlain()

func Warningf

func Warningf(fmtString string, args ...interface{})

func Warningln

func Warningln(args ...interface{})

Types

type P

type P interface {
	// Mimics the behavior of fmt.Println
	Infoln(args ...interface{})
	Warningln(args ...interface{})
	Errorln(args ...interface{})
	Debugln(args ...interface{})

	Infof(f string, args ...interface{})
	Warningf(f string, args ...interface{})
	Errorf(f string, args ...interface{})
	Debugf(f string, args ...interface{})
	V(level int) P

	// Output with no header
	RawOutput(args ...interface{})
}

func NewP

func NewP(out io.Writer) P

func V

func V(level int) P

Jump to

Keyboard shortcuts

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