foxdebug

package module
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 10 Imported by: 0

README

Go Reference GitHub release (latest SemVer) GitHub go.mod Go version

Convenient debug handler for fox.

Foxdebug is a small helper package for the Fox router, designed to provide detailed system and request information for debugging purposes. This package should only be used in a development environment as it may expose sensitive information.

Installation

go get -u github.com/tigerwill90/foxdebug
Usage

To use the foxdebug package, simply import it and register the DebugHandler to any route.

package main

import (
	"errors"
	"log"
	"net/http"

	"github.com/tigerwill90/fox"
	"github.com/tigerwill90/foxdebug"
)

func main() {
	f, err := fox.New(fox.DefaultOptions())
	if err != nil {
		panic(err)
	}
	f.MustHandle(http.MethodGet, "/debug", foxdebug.Handler())

	if err = http.ListenAndServe(":8080", f); err != nil && !errors.Is(err, http.ErrServerClosed) {
		log.Fatalln(err)
	}
}
License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler added in v0.24.0

func Handler() fox.HandlerFunc

Handler returns a HandlerFunc that responds with detailed system, router and request information. This function may leak sensitive information and is only useful for debugging purposes, providing a comprehensive overview of the incoming request and the system it is running on.

func HandlerWith added in v0.24.0

func HandlerWith(f *fox.Router) fox.HandlerFunc

HandlerWith returns a HandlerFunc that responds with detailed system, router and request information using the provided router instance. This function may leak sensitive information and is only useful for debugging purposes, providing a comprehensive overview of the incoming request and the system it is running on.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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