Documentation
¶
Index ¶
- Constants
- Variables
- func GetHumanBytesString(bytes uint64) string
- func GetHumanBytesStringOrError(bytes int64) string
- func IsVerbose() bool
- func MakePrefixPrinter(printer Printer, prefix string) prefixPrinter
- func MakePrinter(file *os.File) printer
- func MakePrinterFromWriter(w io.Writer) printer
- func MakePrinterOn(file *os.File, on bool) printer
- func SetTesting()
- func SetTodoOn()
- func SetVerbose(on bool)
- func Todo(f string, a ...any) (err error)
- func TodoP0(f string, a ...any) (err error)
- func TodoP1(f string, a ...any) (err error)
- func TodoP2(f string, a ...any) (err error)
- func TodoP3(f string, a ...any) (err error)
- func TodoP4(f string, a ...any) (err error)
- func TodoP5(f string, a ...any) (err error)
- type DevPrinter
- type HumanReadableBytes
- type Printer
- type Priority
Constants ¶
View Source
const ( P0 = Priority(iota) P1 P2 P3 P4 P5 )
Variables ¶
View Source
var CLIErrorTreeEncoder interfaces.EncoderToWriter[error] = encoder{}
View Source
var Null null
View Source
var (
SetOutput = log.SetOutput
)
Functions ¶
func GetHumanBytesString ¶
func MakePrefixPrinter ¶
func MakePrinter ¶
func MakePrinterFromWriter ¶
func MakePrinterOn ¶
func SetTesting ¶
func SetTesting()
func SetVerbose ¶
func SetVerbose(on bool)
TODO add compile-time determined verbosity for testing / debugging
Types ¶
type DevPrinter ¶
type DevPrinter interface {
Printer
Caller(skip int) Printer
FunctionName(skip int)
Stack(skip, count int)
}
TODO make utility functions
func Debug ¶
func Debug() DevPrinter
func DebugAllowCommit ¶
func DebugAllowCommit() DevPrinter
func DebugBatsTestBody ¶
func DebugBatsTestBody() DevPrinter
TODO replace with a dynamic `DebugOnEnv("BATS_TEST_BODY")`
func Log ¶
func Log() DevPrinter
type HumanReadableBytes ¶
type HumanReadableBytes string
func (HumanReadableBytes) GetByteCount ¶
func (h HumanReadableBytes) GetByteCount() uint64
func (*HumanReadableBytes) Set ¶
func (h *HumanReadableBytes) Set(v string) error
func (HumanReadableBytes) String ¶
func (h HumanReadableBytes) String() string
type Printer ¶
type Printer = interfaces.Printer
Click to show internal directories.
Click to hide internal directories.