console

package
v0.1.6-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(msg string, a ...any) error

Errorf prints a formated error (in red) to the console. Errorf returns an error built with the formated message.

func Logf

func Logf(msg string, a ...any) error

Logf prints a formated log (in white) to the console. Logf does nothing if SHOW_LEVEL is not equal to SHOW_ALL. Logf returns an error built with the formated message.

func Panicf

func Panicf(msg string, a ...any)

Panicf is equivalent to Errorf followed by a panic If r is nil Stackf create a panic

func Stackf

func Stackf()

Stackf prints the stack trace to the console

func Warnf

func Warnf(msg string, a ...any) error

Warnf prints a formated warning (in yellow) to the console. Warnf does nothing if SHOW_LEVEL equal SHOW_ERRONLY Warnf returns an error built with the formated message.

Types

type SHOW_LEVEL

type SHOW_LEVEL uint
const (
	SHOW_ALL     SHOW_LEVEL = 0x00
	SHOW_WARNERR SHOW_LEVEL = 0x01
	SHOW_ERRONLY SHOW_LEVEL = 0x02
)
var Show SHOW_LEVEL

Jump to

Keyboard shortcuts

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