print

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Out

func Out(ctx context.Context, prefix string, writer io.Writer, pt PayloadType, v interface{}) error

Out takes the payload and print it to the output in the specified format using the writer if the format chosen is print do pass a struct not a pointer pass a pointer if the format chosen is either json or yaml

Types

type PayloadType

type PayloadType uint
const (
	JSON PayloadType = iota
	YAML
	TEXT
)

func PayloadTypeFromString

func PayloadTypeFromString(s string) PayloadType

Jump to

Keyboard shortcuts

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