// UsageForContextWithTemplate is the base usage function. You generally don't need to use this.
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)
}
989095
func (o *CreateJSONWebKeySetParams) WithContext(ctx context.Context) *CreateJSONWebKeySetParams {
	o.SetContext(ctx)
	return o
}
1301033
func (session *Session) WithContext(ctx context.Context) *Session {
	s := *session
	s.context = ctx
	return &s
}
747243
func (o *IntrospectOAuth2TokenParams) WithContext(ctx context.Context) *IntrospectOAuth2TokenParams {
	o.SetContext(ctx)
	return o
}
451694
func (call *DownloadRichMenuImageCall) WithContext(ctx context.Context) *DownloadRichMenuImageCall {
	call.ctx = ctx
	return call
}
848893
func (q *Queryx) WithContext(ctx context.Context) *Queryx {
	q.Query = q.Query.WithContext(ctx)
	return q
}
1224569
func (dc *DeepCopier) WithContext(ctx map[string]interface{}) *DeepCopier {
	dc.ctx = ctx
	return dc
}
375428
func (o *RevokeOAuth2TokenParams) WithContext(ctx context.Context) *RevokeOAuth2TokenParams {
	o.SetContext(ctx)
	return o
}
103227
func WithContext(ctx context.Context) FeatureOption {
	return func(opts *featureOption) {
		opts.ctx = &ctx
	}
}
804975
func (e *Error) WithContext(ctx context.Context) *Error {
	if i, ok := infoFromContext(ctx); ok {
		e.info = i.data
		e.request = i.request
	}
	return e
}
78944
func (a *Application) UsageTemplate(template string) *Application {
	a.usageTemplate = template
	return a
}
731887
func (r *Request) WithContext(ctx context.Context) *Request {
	r.Request = r.Request.WithContext(ctx)
	return r
}
187486
func (call *CreateRichMenuCall) WithContext(ctx context.Context) *CreateRichMenuCall {
	call.ctx = ctx
	return call
}
947501
func (o *CreateParams) WithContext(ctx context.Context) *CreateParams {
	o.SetContext(ctx)
	return o
}
1002191
func (o *OauthAuthParams) WithContext(ctx context.Context) *OauthAuthParams {
	o.SetContext(ctx)
	return o
}
449321
func (builder *UpdateSetCommandBuilder) WithContext(context []byte) *UpdateSetCommandBuilder {
	builder.protobuf.Context = context
	return builder
}
1292845
func (call *GetDefaultRichMenuCall) WithContext(ctx context.Context) *GetDefaultRichMenuCall {
	call.ctx = ctx
	return call
}