// ApplyWithError populates the flag given the flag set and environment
7470
func (f Float64Flag) ApplyWithError(set *flag.FlagSet) error {
	if envVal, ok := flagFromFileEnv(f.FilePath, f.EnvVar); ok {
		envValFloat, err := strconv.ParseFloat(envVal, 10)
		if err != nil {
			return fmt.Errorf("could not parse %s as float64 value for flag %s: %s", envVal, f.Name, err)
		}

		f.Value = float64(envValFloat)
	}

	eachName(f.Name, func(name string) {
		if f.Destination != nil {
			set.Float64Var(f.Destination, name, f.Value, f.Usage)
			return
		}
		set.Float64(name, f.Value, f.Usage)
	})

	return nil
}
994870
func (logger *Logger) WithError(err error) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithError(err)
}
1216688
func (l *namedLogger) WithError(err error) bark.Logger {
	return &namedLogger{
		name:      l.name,
		forwardTo: l.forwardTo,
		err:       err,
		fields:    l.Fields(),
	}
}
544712
func (h *AsyncHttpHandler) CompletedWithError(err error) {

	h.manager.lock.RLock()
	defer h.manager.lock.RUnlock()

	godbc.Require(h.completed == false)

	h.err = err
	h.completed = true

	godbc.Ensure(h.completed == true)
}
754935
func (f BoolFlag) ApplyWithError(set *flag.FlagSet) error {
	val := false
	if envVal, ok := flagFromFileEnv(f.FilePath, f.EnvVar); ok {
		if envVal == "" {
			val = false
		} else {
			envValBool, err := strconv.ParseBool(envVal)
			if err != nil {
				return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err)
			}
			val = envValBool
		}
	}

	eachName(f.Name, func(name string) {
		if f.Destination != nil {
			set.BoolVar(f.Destination, name, val, f.Usage)
			return
		}
		set.Bool(name, val, f.Usage)
	})

	return nil
}
270183
func (f Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error {
	if envVal, ok := flagFromFileEnv(f.FilePath, f.EnvVar); ok {
		newVal := &Int64Slice{}
		for _, s := range strings.Split(envVal, ",") {
			s = strings.TrimSpace(s)
			if err := newVal.Set(s); err != nil {
				return fmt.Errorf("could not parse %s as int64 slice value for flag %s: %s", envVal, f.Name, err)
			}
		}
		if f.Value == nil {
			f.Value = newVal
		} else {
			*f.Value = *newVal
		}
	}

	eachName(f.Name, func(name string) {
		if f.Value == nil {
			f.Value = &Int64Slice{}
		}
		set.Var(f.Value, name, f.Usage)
	})
	return nil
}
181099
func (f *Int64Flag) Apply(set *flag.FlagSet) {
	f.set = set
	f.Int64Flag.Apply(set)
}
80657
func WithErrValidation(err error, field, reason string) error {
	return struct {
		error
		errValidationBehavior
	}{
		err,
		errValidationBehavior{
			field:  field,
			reason: reason,
		},
	}
}
1265925
func WithError(err error) LogEntry {
	return &logEntry{log.WithField(logrus.ErrorKey, err)}
}
1241737
func (f *GenericFlag) ApplyWithError(set *flag.FlagSet) error {
	f.set = set
	return f.GenericFlag.ApplyWithError(set)
}
382676
func (m URLs) WithError(err *probe.Error) URLs {
	m.Error = err
	return m
}
974258
func (o *GetFqdnCacheParams) WithMatchpattern(matchpattern *string) *GetFqdnCacheParams {
	o.SetMatchpattern(matchpattern)
	return o
}
422622
func WithError(message string, inner error) Goof {
	return WithFieldsE(nil, message, inner)
}
64779
func apply(args map[string][]string, flags apiserverflag.NamedFlagSets, ignoreMissing bool) []error {
	var errs []error
	for key, value := range args {
		found := false
		// since flags are now groupped into sets we need to check each and every
		// single of them and complain only if we don't find the flag at all
		for _, fs := range flags.FlagSets {
			if flag := fs.Lookup(key); flag != nil {
				found = true
				for _, s := range value {
					if err := flag.Value.Set(s); err != nil {
						errs = append(errs, field.Invalid(field.NewPath(key), s, fmt.Sprintf("could not be set: %v", err)))
						break
					}
				}
			}
		}
		if !found && !ignoreMissing {
			errs = append(errs, field.Invalid(field.NewPath("flag"), key, "is not a valid flag"))
		}
	}
	return errs
}
154794
func ErrorWithStack(level string, err error, stack Stack, fields ...*Field) {
	buildAndPushError(level, err, stack, fields...)
}
165364
func WithError(msg string, err error) {
	p := problem.FromError(err)
	if p != nil {
		WithProblem(msg, p)
	}
	displayError(msg, err)
	os.Exit(Software)
}
791289
func (f Uint64Flag) ApplyWithError(set *flag.FlagSet) error {
	if envVal, ok := flagFromFileEnv(f.FilePath, f.EnvVar); ok {
		envValInt, err := strconv.ParseUint(envVal, 0, 64)
		if err != nil {
			return fmt.Errorf("could not parse %s as uint64 value for flag %s: %s", envVal, f.Name, err)
		}

		f.Value = uint64(envValInt)
	}

	eachName(f.Name, func(name string) {
		if f.Destination != nil {
			set.Uint64Var(f.Destination, name, f.Value, f.Usage)
			return
		}
		set.Uint64(name, f.Value, f.Usage)
	})

	return nil
}