// PrintWarnings to the writer
966831
func (r *Result) PrintWarnings(out io.Writer) {
	if len(r.Warnings) == 0 {
		return
	}
	fmt.Fprintf(out, strings.Join(r.Warnings, "\n")+"\n")
}
1146341
func (s *UpdateApiOutput) SetWarnings(v []*string) *UpdateApiOutput {
	s.Warnings = v
	return s
}
415407
func PrintAndReturnErrors(err error, printer func(string, ...interface{})) error {
	if err == nil || err.Error() == "" {
		return nil
	}

	if stackErr, ok := err.(StackError); ok {
		if len(stackErr.Stack()) == 0 {
			return nil
		}

		stack := stackErr.Stack()

		for _, e := range stack {
			if e.HasStack() {
				for _, es := range e.Stack {
					printer("%v", es)
				}
				continue
			}
			printer("%v", e)
		}

		return stackErr
	}

	printer("%v", err)
	return err
}
386293
func (ui *UI) DisplayWarnings(warnings []string) {
	for _, warning := range warnings {
		fmt.Fprintf(ui.Err, "%s\n", ui.TranslateText(warning))
	}
	if len(warnings) > 0 {
		fmt.Fprintln(ui.Err)
	}
}
22406
func Warn(format string, v ...interface{}) string {
	return output(LevelWarn, fmt.Sprintf(format, v...), loggerCodeDepth)
}
894163
func (u *UI) Warn(format string, args ...interface{}) {
	var w io.Writer = readline.Stdout
	icon := u.BoldColorString(Yellow, "⚠ ")
	if !Attached() {
		w = readline.Stderr
		icon = ""
	}

	o := fmt.Sprintf(icon+format, args...)
	fmt.Fprintln(w, ansiwrap.WrapIndent(o, u.Cols, u.Indent, u.Indent))
}
1039366
func (s *RestApi) SetWarnings(v []*string) *RestApi {
	s.Warnings = v
	return s
}
149132
func (s *GetApiOutput) SetWarnings(v []*string) *GetApiOutput {
	s.Warnings = v
	return s
}
1018367
func logWarn(source, format string, v ...interface{}) {
	stdLogger.Printf(fmt.Sprintf("[WARNING] %s %s", source, format), v...)
}
122333
func (v *ValidationMessages) getWarnings() error {
	var messages []string
	for _, msg := range v.Messages {
		if msg.Typ == WARN || msg.Typ == CRIT {
			messages = append(messages, msg.Message)
		}
	}
	if len(messages) > 0 {
		return fmt.Errorf("Validation failed: %s", strings.Join(messages, ","))
	}
	return nil
}
817977
func (sc *StatementContext) NumErrorWarnings() (ec, wc string) {
	var (
		ecNum uint16
		wcNum int
	)
	sc.mu.Lock()
	ecNum = sc.mu.errorCount
	wcNum = len(sc.mu.warnings)
	sc.mu.Unlock()

	if ecNum == 0 {
		ec = zero
	} else {
		ec = strconv.Itoa(int(ecNum))
	}

	if wcNum == 0 {
		wc = zero
	} else {
		wc = strconv.Itoa(wcNum)
	}
	return
}
1218068
func (p *httpStreamPair) printError(s string) {
	p.lock.RLock()
	defer p.lock.RUnlock()
	if p.errorStream != nil {
		fmt.Fprint(p.errorStream, s)
	}
}
156585
func (s *UpdatePipelineOutput) SetWarnings(v []*Warning) *UpdatePipelineOutput {
	s.Warnings = v
	return s
}
909461
func (sl *SysLogger) Warning(info, msg string) {
	sl.writer.Warning(info + " " + msg)
}
470903
func (e *Errors) Warning(format string, a ...interface{}) error {
	return e.add(Warning, format, a...)
}
972134
func (o *TriggersOptions) printTriggers(infos []*resource.Info) error {
	w := tabwriter.NewWriter(o.Out, 0, 2, 2, ' ', 0)
	defer w.Flush()
	fmt.Fprintf(w, "NAME\tTYPE\tVALUE\tAUTO\n")
	for _, info := range infos {
		_, err := UpdateTriggersForObject(info.Object, func(triggers *TriggerDefinition) error {
			fmt.Fprintf(w, "%s/%s\t%s\t%s\t%t\n", info.Mapping.Resource.Resource, info.Name, "config", "", triggers.ConfigChange)
			for _, image := range triggers.ImageChange {
				var details string
				switch {
				case len(image.Names) > 0:
					if len(image.Namespace) > 0 {
						details = fmt.Sprintf("%s/%s (%s)", image.Namespace, image.From, strings.Join(image.Names, ", "))
					} else {
						details = fmt.Sprintf("%s (%s)", image.From, strings.Join(image.Names, ", "))
					}
				case len(image.Namespace) > 0:
					details = fmt.Sprintf("%s/%s", image.Namespace, image.From)
				default:
					details = image.From
				}
				fmt.Fprintf(w, "%s/%s\t%s\t%s\t%t\n", info.Mapping.Resource.Resource, info.Name, "image", details, image.Auto)
			}
			for _, s := range triggers.GenericWebHooks {
				val := "<secret>"
				if s.AllowEnv {
					val += ", allowenv"
				}
				fmt.Fprintf(w, "%s/%s\t%s\t%s\t%s\n", info.Mapping.Resource.Resource, info.Name, "webhook", val, "")
			}
			for range triggers.GitHubWebHooks {
				fmt.Fprintf(w, "%s/%s\t%s\t%s\t%s\n", info.Mapping.Resource.Resource, info.Name, "github", "<secret>", "")
			}
			for range triggers.GitLabWebHooks {
				fmt.Fprintf(w, "%s/%s\t%s\t%s\t%s\n", info.Mapping.Resource.Resource, info.Name, "gitlab", "<secret>", "")
			}
			for range triggers.BitbucketWebHooks {
				fmt.Fprintf(w, "%s/%s\t%s\t%s\t%s\n", info.Mapping.Resource.Resource, info.Name, "bitbucket", "<secret>", "")
			}
			return nil
		})
		if err != nil {
			klog.V(2).Infof("Unable to calculate trigger for %s: %v", info.Name, err)
			fmt.Fprintf(w, "%s/%s\t%s\t%s\t%t\n", info.Mapping.Resource.Resource, info.Name, "<error>", "", false)
		}
	}
	return nil
}
408507
func PrintError(w io.Writer, err error) {
	if list, ok := err.(ErrorList); ok {
		for _, e := range list {
			fmt.Fprintf(w, "%s\n", e)
		}
	} else if err != nil {
		fmt.Fprintf(w, "%s\n", err)
	}
}