fmtutil

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package fmtutil implements some formatting utility functions.

Package fmtutil implements some formatting utility functions.

Index

Constants

This section is empty.

Variables

View Source
var (
	JSONPretty bool   = true
	JSONPrefix string = ""
	JSONIndent string = "  "
)

Functions

func PrintJSON

func PrintJSON(in interface{}) error

PrintJSON pretty prints anything using a default indentation

func PrintJSONMin

func PrintJSONMin(in interface{}) error

PrintJSONMin pretty prints anything using a default indentation

func PrintJSONMore

func PrintJSONMore(in interface{}, jsonPrefix, jsonIndent string) error

PrintJSONMore pretty prints anything using supplied indentation.

func PrintReader added in v0.0.15

func PrintReader(r io.Reader) error

func SprintfFormatLeadingCharLength added in v0.26.9

func SprintfFormatLeadingCharLength(char string, length uint) string

func SprintfFormatLeadingCharMaxIntVal added in v0.26.9

func SprintfFormatLeadingCharMaxIntVal(char string, value int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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