cmdfmt

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdFormatter

func NewCmdFormatter(cmds []string, optz ...OptBasicExternalFormatterOptsSetter) format.Provider

func NewFormatter

func NewFormatter(cmds []string, optz ...OptBasicExternalFormatterOptsSetter) format.Provider

func NewNoopBasicExternalFormatProvider

func NewNoopBasicExternalFormatProvider() format.Provider

func NewNoopExternalFormatProvider

func NewNoopExternalFormatProvider() format.Provider

func WrapExternalFormatterWithStdio

func WrapExternalFormatterWithStdio(ext ExternalFormatter) format.Provider

Types

type BasicExternalFormatterOpts

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

func (*BasicExternalFormatterOpts) Validate

func (o *BasicExternalFormatterOpts) Validate() error

type DockerExternalFormatter

type DockerExternalFormatter struct {
	Image   string
	Command []string
	Once    sync.Once
	// contains filtered or unexported fields
}

func NewDockerCmdFormatter

func NewDockerCmdFormatter(command []string, optz ...OptBasicExternalFormatterOptsSetter) *DockerExternalFormatter

func (*DockerExternalFormatter) Format

type ExternalFormatter

type ExternalFormatter interface {
	Format(ctx context.Context, reader io.Reader) (io.Reader, func() error)
	Indent() string
	TempFiles() map[string]string
}

type NoopExternalFormatter

type NoopExternalFormatter struct {
}

func (*NoopExternalFormatter) Format

func (me *NoopExternalFormatter) Format(_ context.Context, input io.Reader) (io.Reader, func() error)

func (*NoopExternalFormatter) Indent

func (me *NoopExternalFormatter) Indent() string

func (*NoopExternalFormatter) TempFiles

func (me *NoopExternalFormatter) TempFiles() map[string]string

Jump to

Keyboard shortcuts

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