debug

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

package debug provides functions for printing debug messages and do debugging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(f func())

Apply is a function that applies a function.

Parameters:

  • f: The function to apply.

If f is nil, nothing is applied.

func Print

func Print(title string, f func() []string)

Print is a function that prints a message.

Parameters:

  • title: The title of the message.
  • f: The function to print the message.

The title is written preceeded by "[DEBUG]:" and, if it is empty, "[No title was provided]" is written instead. Moreover, if f is nil or no lines are returned, nothing is printed.

After the message, a new line is printed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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