fmtutil

package
v0.64.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 6 Imported by: 193

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 MustPrintJSON added in v0.37.3

func MustPrintJSON(in any)

func PrintJSON

func PrintJSON(in any) error

PrintJSON pretty prints anything using a default indentation

func PrintJSONMin

func PrintJSONMin(in any) error

PrintJSONMin pretty prints anything using a default indentation

func PrintJSONMore

func PrintJSONMore(in any, jsonPrefix, jsonIndent string) error

PrintJSONMore pretty prints anything using supplied indentation.

func PrintReader

func PrintReader(r io.Reader) error

func SprintfFormatLeadingCharLength

func SprintfFormatLeadingCharLength(char string, length uint) string

func SprintfFormatLeadingCharMaxIntVal

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