Documentation
¶
Index ¶
- Constants
- Variables
- func BoolVarAliases(fs *flag.FlagSet, dst *bool, value bool, usage string, names ...string)
- func CleanExecPath(path string) string
- func CommandFileConflict(app, name, hint string) error
- func DetectWidth(w io.Writer) int
- func DurationVarAliases(fs *flag.FlagSet, dst *time.Duration, value time.Duration, usage string, ...)
- func ExitCode(err error) int
- func HasFileConflict(name string) bool
- func IntVarAliases(fs *flag.FlagSet, dst *int, value int, usage string, names ...string)
- func IsExitCodeOnly(err error) bool
- func NewExecClient(version string, f ExecFlags) (*httpx.Client, func() error, error)
- func NewFlagSet(name string) *flag.FlagSet
- func NewSubcommandFlagSet(app, name string, w io.Writer) *flag.FlagSet
- func ParseCompareTargets(raw string) ([]string, error)
- func ParseRunDoc(src RunSource) (*restfile.Document, error)
- func PrintFlagDefaults(w io.Writer, fs *flag.FlagSet)
- func PrintFlagSetUsage(w io.Writer, app string, fs *flag.FlagSet)
- func StdinRunPath(workspace string) string
- func StringListVarAliases(fs *flag.FlagSet, dst *[]string, usage string, names ...string)
- func StringVar(fs *flag.FlagSet, dst *string, name, value, usage string)
- func StringVarAliases(fs *flag.FlagSet, dst *string, value, usage string, names ...string)
- func WriteRunRequestChoices(w io.Writer, path string, choices []RunRequestChoice) error
- func WriteTextStyled(w io.Writer, rep *runfmt.Report, color termcolor.Config, def *theme.Definition) error
- type ExecConfig
- type ExecFlags
- func (f *ExecFlags) Bind(fs *flag.FlagSet)
- func (f *ExecFlags) BindTelemetryFlags(fs *flag.FlagSet)
- func (f ExecFlags) Resolve(filePath string) (ExecConfig, error)
- func (f ExecFlags) ResolveSession(filePath string) (ExecConfig, error)
- func (f ExecFlags) TelemetryConfig(version string) telemetry.Config
- func (f ExecFlags) ValidateEnvFlag() error
- type ExitErr
- type GroupFlags
- type RunRequestChoice
- type RunRequestPromptOptions
- type RunSource
Constants ¶
const MaxTextWidth = 100
MaxTextWidth caps wrapped CLI text output at a readable line length.
Variables ¶
var ErrRunRequestChoiceCanceled = errors.New("request selection canceled")
Functions ¶
func BoolVarAliases ¶ added in v0.39.4
func CleanExecPath ¶ added in v0.28.1
func CommandFileConflict ¶
func DetectWidth ¶ added in v0.46.1
DetectWidth resolves the terminal width. COLUMNS overrides everything, otherwise writer, the standard streams and finally /dev/tty are probed so a redirected stderr still yields the real width. defaultWidth is the last resort.
func DurationVarAliases ¶ added in v0.39.4
func HasFileConflict ¶
func IntVarAliases ¶ added in v0.39.4
func IsExitCodeOnly ¶ added in v0.36.1
IsExitCodeOnly reports whether err is only an exit-code carrier.
Commands use this after they have already written their output and need to return a non-zero process status without producing another stderr diagnostic.
func NewExecClient ¶ added in v0.28.1
func NewFlagSet ¶
func ParseCompareTargets ¶
func StdinRunPath ¶ added in v0.28.1
StdinRunPath gives stdin-backed runs a stable request-file path so relative resolution still has a workspace anchor.
func StringListVarAliases ¶ added in v0.50.0
func StringVarAliases ¶ added in v0.39.4
func WriteRunRequestChoices ¶ added in v0.28.1
func WriteRunRequestChoices( w io.Writer, path string, choices []RunRequestChoice, ) error
func WriteTextStyled ¶ added in v0.29.2
func WriteTextStyled( w io.Writer, rep *runfmt.Report, color termcolor.Config, def *theme.Definition, ) error
WriteTextStyled writes a runfmt text report with CLI-owned ANSI styling.
Types ¶
type ExecConfig ¶ added in v0.28.1
type ExecFlags ¶ added in v0.28.1
type ExecFlags struct {
EnvName string
EnvFile string
Workspace string
Timeout time.Duration
Insecure bool
Follow bool
ProxyURL string
MaxResponseSize string
MaxRedirects int
Recursive bool
CompareTargetsRaw string
CompareBaseline string
CompareGroup string
EnvGroups GroupFlags
// contains filtered or unexported fields
}
func NewExecFlags ¶ added in v0.28.1
func NewExecFlags() ExecFlags
func (*ExecFlags) BindTelemetryFlags ¶ added in v0.28.1
func (ExecFlags) Resolve ¶ added in v0.28.1
func (f ExecFlags) Resolve(filePath string) (ExecConfig, error)
Resolve builds a run configuration and requires a valid environment file.
func (ExecFlags) ResolveSession ¶ added in v1.2.1
func (f ExecFlags) ResolveSession(filePath string) (ExecConfig, error)
ResolveSession builds an editor configuration. Parse errors are returned in Env.FileErr so the editor can open the file, while other load errors remain fatal. Requests stay blocked until the file parses successfully.
func (ExecFlags) TelemetryConfig ¶ added in v0.28.1
func (ExecFlags) ValidateEnvFlag ¶ added in v0.28.1
type GroupFlags ¶ added in v0.49.1
func (*GroupFlags) Set ¶ added in v0.49.1
func (f *GroupFlags) Set(value string) error
func (GroupFlags) String ¶ added in v0.49.1
func (f GroupFlags) String() string
type RunRequestChoice ¶ added in v0.28.1
func BuildRunRequestChoices ¶ added in v0.28.1
func BuildRunRequestChoices(doc *restfile.Document) []RunRequestChoice
func PromptRunRequestChoice ¶ added in v0.28.1
func PromptRunRequestChoice( r io.Reader, w io.Writer, path string, choices []RunRequestChoice, opt RunRequestPromptOptions, ) (RunRequestChoice, error)
type RunRequestPromptOptions ¶ added in v0.28.1
type RunRequestPromptOptions struct {
TTY bool
Color termcolor.Config
Theme *theme.Definition
}