debug

package
v0.0.0-...-d29151c Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugEnabled bool = false

Functions

func RecoverRenderer

func RecoverRenderer(proxyUrl string) func(next http.Handler) http.Handler

func RenderError

func RenderError(w http.ResponseWriter, d TemplateData)

Types

type DebugError

type DebugError struct {
	Err error
}

func (*DebugError) Error

func (e *DebugError) Error() string

type ErrorRef

type ErrorRef struct {
	File        string
	Line        string
	Col         string
	Description string
	Func        string
	Code        string
	LineStart   int
}

func NewErrorRef

func NewErrorRef(file string, line string, col string, function string, desc string) (ErrorRef, error)

func ParseErrorOutput

func ParseErrorOutput(appPath string, output string) (ErrorRef, error)

type Handler

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

func NewProxy

func NewProxy(appPath string, cmd string, proxyUrl string, buildPath string) *Handler

func (*Handler) Build

func (h *Handler) Build() (bool, error)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TemplateData

type TemplateData struct {
	Type     string
	Message  string
	ProxyUrl string
	Stack    []ErrorRef
}

Jump to

Keyboard shortcuts

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