// WithShowSafeContent returns a context with the value for ShowSafeContent set
488187
func WithShowSafeContent(ctx context.Context, bv bool) context.Context {
	return context.WithValue(ctx, ctxKeyShowSafeContent, bv)
}
665151
func (call *GetNumberMessagesCall) WithContext(ctx context.Context) *GetNumberMessagesCall {
	call.ctx = ctx
	return call
}
648747
func (o *GetPrefilterParams) WithContext(ctx context.Context) *GetPrefilterParams {
	o.SetContext(ctx)
	return o
}
89674
func (call *PushMessageCall) WithContext(ctx context.Context) *PushMessageCall {
	call.ctx = ctx
	return call
}
789751
func (o *UploadTaskFileParams) WithContext(ctx context.Context) *UploadTaskFileParams {
	o.SetContext(ctx)
	return o
}
338739
func (a *Application) UsageForContextWithTemplate(context *ParseContext, indent int, tmpl string) error {
	width := guessWidth(a.usageWriter)
	funcs := template.FuncMap{
		"Indent": func(level int) string {
			return strings.Repeat(" ", level*indent)
		},
		"Wrap": func(indent int, s string) string {
			buf := bytes.NewBuffer(nil)
			indentText := strings.Repeat(" ", indent)
			doc.ToText(buf, s, indentText, "  "+indentText, width-indent)
			return buf.String()
		},
		"FormatFlag": formatFlag,
		"FlagsToTwoColumns": func(f []*FlagModel) [][2]string {
			rows := [][2]string{}
			haveShort := false
			for _, flag := range f {
				if flag.Short != 0 {
					haveShort = true
					break
				}
			}
			for _, flag := range f {
				if !flag.Hidden {
					rows = append(rows, [2]string{formatFlag(haveShort, flag), flag.Help})
				}
			}
			return rows
		},
		"RequiredFlags": func(f []*FlagModel) []*FlagModel {
			requiredFlags := []*FlagModel{}
			for _, flag := range f {
				if flag.Required {
					requiredFlags = append(requiredFlags, flag)
				}
			}
			return requiredFlags
		},
		"OptionalFlags": func(f []*FlagModel) []*FlagModel {
			optionalFlags := []*FlagModel{}
			for _, flag := range f {
				if !flag.Required {
					optionalFlags = append(optionalFlags, flag)
				}
			}
			return optionalFlags
		},
		"ArgsToTwoColumns": func(a []*ArgModel) [][2]string {
			rows := [][2]string{}
			for _, arg := range a {
				s := "<" + arg.Name + ">"
				if !arg.Required {
					s = "[" + s + "]"
				}
				rows = append(rows, [2]string{s, arg.Help})
			}
			return rows
		},
		"FormatTwoColumns": func(rows [][2]string) string {
			buf := bytes.NewBuffer(nil)
			formatTwoColumns(buf, indent, indent, width, rows)
			return buf.String()
		},
		"FormatTwoColumnsWithIndent": func(rows [][2]string, indent, padding int) string {
			buf := bytes.NewBuffer(nil)
			formatTwoColumns(buf, indent, padding, width, rows)
			return buf.String()
		},
		"FormatAppUsage":     formatAppUsage,
		"FormatCommandUsage": formatCmdUsage,
		"IsCumulative": func(value Value) bool {
			r, ok := value.(remainderArg)
			return ok && r.IsCumulative()
		},
		"Char": func(c rune) string {
			return string(c)
		},
	}
	t, err := template.New("usage").Funcs(funcs).Parse(tmpl)
	if err != nil {
		return err
	}
	var selectedCommand *CmdModel
	if context.SelectedCommand != nil {
		selectedCommand = context.SelectedCommand.Model()
	}
	ctx := templateContext{
		App:   a.Model(),
		Width: width,
		Context: &templateParseContext{
			SelectedCommand: selectedCommand,
			FlagGroupModel:  context.flags.Model(),
			ArgGroupModel:   context.arguments.Model(),
		},
	}
	return t.Execute(a.usageWriter, ctx)
}
334932
func WithContext(ctx *cli.Context, opts ...source.Option) source.Source {
	return &cliSource{
		ctx:  ctx,
		opts: source.NewOptions(opts...),
	}
}
540573
func (call *LeaveRoomCall) WithContext(ctx context.Context) *LeaveRoomCall {
	call.ctx = ctx
	return call
}
409008
func (o *PutStatusProbeParams) WithContext(ctx context.Context) *PutStatusProbeParams {
	o.SetContext(ctx)
	return o
}
621407
func (o *AddOneParams) WithContext(ctx context.Context) *AddOneParams {
	o.SetContext(ctx)
	return o
}
396100
func ContextWithServiceDescriptor(ctx context.Context, service *ServiceDescriptor) context.Context {
	return context.WithValue(ctx, serviceContextKey, service)
}
887701
func (q *Query) WithContext(ctx context.Context) *Query {
	q2 := *q
	q2.context = ctx
	return &q2
}
1294902
func (o *IsInstanceAliveParams) WithContext(ctx context.Context) *IsInstanceAliveParams {
	o.SetContext(ctx)
	return o
}
943796
func (call *GetProfileCall) WithContext(ctx context.Context) *GetProfileCall {
	call.ctx = ctx
	return call
}
645946
func (entry *Entry) WithContext(ctx context.Context) *Entry {
	return &Entry{Logger: entry.Logger, Data: entry.Data, Time: entry.Time, err: entry.err, Context: ctx}
}
1069828
func WithContext(ctx context.Context) func(*Client) error {
	return func(c *Client) error {
		c.Ctx = ctx
		return nil
	}
}
514378
func WithContext(ctx context.Context, n uint, interval time.Duration, fn func() error) (err error) {
	for n > 0 {
		n--
		err = fn()
		if err == nil || n <= 0 {
			break
		}
		select {
		case <-ctx.Done():
			return ctx.Err()
		case <-time.After(interval):
		}
	}
	return
}