package pretty
import "google.golang.org/grpc/internal/pretty"
Package pretty defines helper functions to pretty-print structs for logging.
Index ¶
Functions ¶
func FormatJSON ¶
FormatJSON formats the input json bytes with indentation.
If Indent fails, it returns the unchanged input as string.
func ToJSON ¶
func ToJSON(e interface{}) string
ToJSON marshals the input into a json string.
If marshal fails, it falls back to fmt.Sprintf("%+v").
Source Files ¶
pretty.go
- Version
- v1.43.0-dev
- Published
- Oct 29, 2021
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 39 minutes ago –
Tools for package owners.