debug

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugPrint added in v0.1.7

func DebugPrint(w io.Writer, title string, lines iter.Seq[string]) error

DebugPrint is a helper function that prints a string to a writer.

Parameters:

  • w: the writer to write to.
  • title: the title of the debug message. If empty, no title is printed.
  • lines: the lines of the debug message. If nil, no lines are printed.

Returns:

  • error: the error that occurred.

Errors:

  • io.ErrShortWrite: if the writer is nil or the lines could not be written fully.
  • any other error returned by the writer.

func LogPrint added in v0.1.8

func LogPrint(l *log.Logger, title string, lines iter.Seq[string]) error

LogPrint acts as DebugPrint but with a logger instead.

Parameters:

  • l: the logger to write to.
  • title: the title of the debug message. If empty, no title is printed.
  • lines: the lines of the debug message. If nil, no lines are printed.

Returns:

  • error: the error that occurred.

Errors:

  • io.ErrShortWrite: if the writer is nil or the lines could not be written fully.
  • any other error returned by the logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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