...

Package cli

import "sigs.k8s.io/structured-merge-diff/v4/internal/cli"
Overview
Index

Overview ▾

Variables

var (
    ErrTooManyOperations = errors.New("exactly one of --merge, --compare, --validate or --fieldset must be provided")
    ErrNeedTwoArgs       = errors.New("--merge and --compare require both --lhs and --rhs")
)

type Operation

type Operation interface {
    Execute(io.Writer) error
}

type Options

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

func (*Options) AddFlags

func (o *Options) AddFlags(fs *flag.FlagSet)

func (*Options) OpenOutput

func (o *Options) OpenOutput() (io.WriteCloser, error)

func (*Options) Resolve

func (o *Options) Resolve() (Operation, error)

resolve turns options in to an operation that can be executed.