io

package
v3.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPipe

func IsPipe(r io.Reader) bool

IsPipe returns whether the given reader is a pipe that can be read.

func Write

func Write(w io.Writer, format string, data interface{}) (err error)

Write output to Stdout. Uses either JSON or formats using the configured template.

Types

type Decoder

type Decoder interface {
	Decode(data interface{}) (paths []string, err error)
}

Decoder is the interface for the functionality that reads and decodes entities from an io.Reader, typically os.Stdin.

func NewJSONDecoder

func NewJSONDecoder(r io.Reader) Decoder

NewJSONDecoder returns a new Decoder on top of r, and that uses the common JSON format used in The Things Stack.

Jump to

Keyboard shortcuts

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