Debugger

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debugger

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

Debugger is a struct that provides a way to print debug messages.

func NewDebugger

func NewDebugger(logger *log.Logger) *Debugger

NewDebugger is a function that creates a new debugger.

Parameters:

  • logger: The logger to use.

Returns:

  • *Debugger: The new debugger.

func (*Debugger) Close

func (d *Debugger) Close()

Close is a function that closes the debugger.

func (*Debugger) GetDebugMode added in v0.3.13

func (d *Debugger) GetDebugMode() bool

GetDebugMode is a function that returns the debug mode.

Returns:

  • bool: The debug mode.

func (*Debugger) Print

func (d *Debugger) Print(v ...interface{})

Print is a function that prints text.

Parameters:

  • v: The values to print.

func (*Debugger) Printf

func (d *Debugger) Printf(format string, v ...interface{})

Printf is a function that prints formatted text.

Parameters:

  • format: The format string.
  • v: The values to print.

func (*Debugger) Println

func (d *Debugger) Println(v ...interface{})

Println is a function that prints a line.

Parameters:

  • v: The values to print.

func (*Debugger) Start

func (d *Debugger) Start()

Start is a function that starts the debugger.

func (*Debugger) ToggleDebugMode

func (d *Debugger) ToggleDebugMode(active bool)

ToggleDebugMode is a function that toggles the debug mode.

Parameters:

  • active: The flag to set the debug mode.

func (*Debugger) Wait

func (d *Debugger) Wait()

Wait is a function that waits for the debugger to finish.

func (*Debugger) Write added in v0.3.9

func (d *Debugger) Write(p []byte) (n int, err error)

Write is a function that writes to the debugger.

Parameters:

  • p: The bytes to write.

Returns:

  • int: Always the length of the bytes.
  • error: Always nil.

type PrintMessage

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

PrintMessage is a struct that represents a message to print.

func NewPrintMessage

func NewPrintMessage(v []any) *PrintMessage

NewPrintMessage is a function that creates a new PrintMessage.

Parameters:

  • v: The values to print.

Returns:

  • *PrintMessage: The new PrintMessage.

type PrintMessager added in v0.3.11

type PrintMessager interface {
}

PrintMessager is an interface that defines a message to print.

type PrintfMessage added in v0.3.11

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

PrintfMessage is a struct that represents a message to print formatted text.

func NewPrintfMessage added in v0.3.11

func NewPrintfMessage(format string, v []any) *PrintfMessage

NewPrintfMessage is a function that creates a new PrintfMessage.

Parameters:

  • format: The format string.
  • v: The values to print.

Returns:

  • *PrintfMessage: The new PrintfMessage.

type PrintlnMessage added in v0.3.11

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

PrintlnMessage is a struct that represents a message to print a line.

func NewPrintlnMessage added in v0.3.11

func NewPrintlnMessage(v []any) *PrintlnMessage

NewPrintlnMessage is a function that creates a new PrintlnMessage.

Parameters:

  • v: The values to print.

Returns:

  • *PrintlnMessage: The new PrintlnMessage.

Jump to

Keyboard shortcuts

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