// FlagOutput will expose, as a Flag, any worker that implements Flag.
518509
func FlagOutput(in worker.Worker, out interface{}) error {
	inFlag, ok := in.(Flag)
	if !ok {
		return errors.Errorf("expected in to implement Flag; got a %T", in)
	}
	outFlag, ok := out.(*Flag)
	if !ok {
		return errors.Errorf("expected out to be a *Flag; got a %T", out)
	}
	*outFlag = inFlag
	return nil
}
761852
func WithLogOutput(o io.Writer) memberSetOption {
	return func(g *memberSet) error {
		g.logOutput = o
		return nil
	}
}
66320
func outputFunc(in worker.Worker, out interface{}) error {
	inWorker, _ := in.(*Tracker)
	if inWorker == nil {
		return errors.Errorf("expected *Tracker input; got %T", in)
	}
	outPointer, _ := out.(*coreleadership.TrackerWorker)
	if outPointer == nil {
		return errors.Errorf("expected *leadership.Tracker output; got %T", out)
	}
	*outPointer = inWorker
	return nil
}
1070199
func ValidateOutputArgs(cmd *cobra.Command) error {
	outputMode := GetFlagString(cmd, "output")
	if outputMode != "" && outputMode != "name" {
		return UsageError(cmd, "Unexpected -o output mode: %v. We only support '-o name'.", outputMode)
	}
	return nil
}
1365256
func outputFunc(in worker.Worker, out interface{}) error {
	inWorker, _ := in.(*stateConfigWatcher)
	if inWorker == nil {
		return errors.Errorf("in should be a %T; got %T", inWorker, in)
	}
	switch outPointer := out.(type) {
	case *bool:
		*outPointer = inWorker.isStateServer()
	default:
		return errors.Errorf("out should be *bool; got %T", out)
	}
	return nil
}
144789
func (c *Controller) TemplateOutput(templatePath string) (data []byte, err error) {
	return TemplateOutputArgs(templatePath, c.ViewArgs)
}
1025692
func (b *BulkAction) BindForOutput(flags *pflag.FlagSet, skippedFlags ...string) {
	skipped := sets.NewString(skippedFlags...)

	if !skipped.Has("output") {
		flags.StringVarP(&b.Output, "output", "o", "", "Output results as yaml or json instead of executing, or use name for succint output (resource/name).")
	}
	if !skipped.Has("dry-run") {
		flags.BoolVar(&b.DryRun, "dry-run", false, "If true, show the result of the operation without performing it.")
	}
	if !skipped.Has("no-headers") {
		flags.Bool("no-headers", false, "Omit table headers for default output.")
		flags.MarkHidden("no-headers")
	}

	// we really want to call the AddNonDeprecatedPrinterFlags method, but that is broken since it doesn't bind vars
	if !skipped.Has("show-labels") {
		flags.Bool("show-labels", false, "When printing, show all labels as the last column (default hide labels column)")
	}
	if !skipped.Has("template") {
		flags.String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
		cobra.MarkFlagFilename(flags, "template")
	}
	if !skipped.Has("sort-by") {
		flags.String("sort-by", "", "If non-empty, sort list types using this field specification.  The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.")
	}
	if !skipped.Has("show-all") {
		flags.BoolP("show-all", "a", false, "When printing, show all resources (default hide terminated pods.)")
	}
}
329479
func (cl *CoLog) SetOutput(w io.Writer) {
	cl.mu.Lock()
	defer cl.mu.Unlock()

	cl.out = w

	// if we have a color formatter, notify if new output supports color
	if _, ok := cl.formatter.(ColorFormatter); ok {
		cl.formatter.(ColorFormatter).ColorSupported(cl.colorSupported())
	}
}
190339
func Output(out io.Writer) Option {
	return func(l *handler) {
		l.out = out
	}
}
715755
func outputFunc(in worker.Worker, out interface{}) error {
	inWorker, _ := in.(*stateWorker)
	if inWorker == nil {
		return errors.Errorf("in should be a %T; got %T", inWorker, in)
	}

	switch outPointer := out.(type) {
	case *StateTracker:
		*outPointer = inWorker.stTracker
	default:
		return errors.Errorf("out should be *StateTracker; got %T", out)
	}
	return nil
}
334387
func (logger *Logger) ResetOutput() {
	logger.outputMutex.Lock()
	logger.outputs = make([]*loggerOutputWrapper, 0)
	logger.outputMutex.Unlock()
}
583082
func outputFunc(in worker.Worker, out interface{}) error {
	inWorker, _ := in.(*apiConnWorker)
	if inWorker == nil {
		return errors.Errorf("in should be a %T; got %T", inWorker, in)
	}

	switch outPointer := out.(type) {
	case *base.APICaller:
		*outPointer = inWorker.conn
	case *api.Connection:
		// Using api.Connection is strongly discouraged as consumers
		// of this API connection should not be able to close it. This
		// option is only available to support legacy upgrade steps.
		*outPointer = inWorker.conn
	default:
		return errors.Errorf("out should be *base.APICaller or *api.Connection; got %T", out)
	}
	return nil
}
311607
func (fl *defaultFormatLogger) setOutput(output io.Writer) {
	fl.logWriter = log.New(output, "", 0) // No prefixes
}
1030859
func SetOutput() {
	out, err := LogOutput()
	if err != nil {
		log.Fatal(err)
	}

	if out == nil {
		out = ioutil.Discard
	}

	log.SetOutput(out)
}
1276720
func outputFunc(in worker.Worker, out interface{}) error {
	inWorker, _ := in.(*centralHub)
	if inWorker == nil {
		return errors.Errorf("in should be a %T; got %T", inWorker, in)
	}

	switch outPointer := out.(type) {
	case **pubsub.StructuredHub:
		*outPointer = inWorker.hub
	default:
		return errors.Errorf("out should be *pubsub.StructuredHub; got %T", out)
	}
	return nil
}
1147041
func SetOutput(out io.Writer) {
	std = New(out, std.Prefix(), std.Flags(), std.priority)
}
589561
func (l *Logger) SetOutput(w io.Writer) {
	l.mu.Lock()
	defer l.mu.Unlock()
	l.lg.SetOutput(w)
}