explorable

package
Version: v2.5.2-0...-f3a5e34 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = log.Logger(log.DefaultLogger.CreateChild())

DefaultLogger is used by explorable if a handler hasn't set a logger

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Val      interface{}
	BasePath string
	Logger   log.Logger
}

Handler allows you to serve an exportable object for debugging over HTTP

func (*Handler) ServeHTTP

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

type Result

type Result struct {
	Result   interface{}
	Children []string
	Desc     string
}

Result is the crude explorable representation of an object returned by ExploreObject

func ExploreObject

func ExploreObject(t reflect.Value, path []string) *Result

ExploreObject is a crude public way to explore an object's values via reflection

Source Files

Jump to

Keyboard shortcuts

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