dump

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(v interface{}) interface{}

Dump converts an arbitrary value to a simple scalar value.

The purpose of this function is to provide an alternative to fmt verbs such as %#v or %+v that returns a value in a more human-readable format.

String, int and floats are returned as is. Byte slices are converted to hex format. Complex data structures are represented as JSON.

It does not support recursive data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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