util

package
v2.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTabWriter

func NewTabWriter(w io.Writer) *tabwriter.Writer

NewTabWriter returns a default writer to write tables.

func Print

func Print(format string, in interface{}, w io.Writer, fn PrintTable) error

Print prints any object in yaml, json or table format.

func SanitizeAddr added in v2.14.0

func SanitizeAddr(addr string) (string, error)

Sanitize and validate HTTP listen address. It accepts "port", ":port", "ip:port", "[ipv6]:port" as valid addresses if only "port" is provided, the semi-colon prefix is added

Types

type PrintTable

type PrintTable func(w io.Writer) error

PrintTable defines how to print a table.

Jump to

Keyboard shortcuts

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