output

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStructToString

func DefaultStructToString(input Formattable) (string, error)

func MarshalToJson

func MarshalToJson(input Formattable) (string, error)

func MarshalToYaml

func MarshalToYaml(input Formattable) (string, error)

Types

type Formattable

type Formattable interface {
	GetFetchError() error
	GetHttpResponse() *_nethttp.Response
	Get() interface{}
}

type Formatter

type Formatter func(Formattable) (string, error)

type Output

type Output struct {
	Formatter Formatter
}

func NewOutput

func NewOutput(outputFormatter string) *Output

Jump to

Keyboard shortcuts

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