cmd

package
v0.0.0-...-66691d1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ReaderIdent = "-"

Variables

View Source
var OSStreams = Streams{
	In:  os.Stdin,
	Out: os.Stdout,
	Err: os.Stderr,
}

Functions

func ReadFileOrReader

func ReadFileOrReader(filename string, orStream io.Reader) ([]byte, error)

Types

type OutputOptions

type OutputOptions struct {
	Registry *renderer.Registry
	Output   string
}

func (*OutputOptions) AddFlags

func (o *OutputOptions) AddFlags(fs *pflag.FlagSet)

func (*OutputOptions) Renderer

func (o *OutputOptions) Renderer(ifEmpty string) (renderer.Renderer, error)

func (*OutputOptions) RendererOrNil

func (o *OutputOptions) RendererOrNil() (renderer.Renderer, error)

type OutputOptionsFactory

type OutputOptionsFactory struct {
	// contains filtered or unexported fields
}

func (*OutputOptionsFactory) NewOutputOptions

func (f *OutputOptionsFactory) NewOutputOptions() *OutputOptions

type Streams

type Streams struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer
}

Jump to

Keyboard shortcuts

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