runflags

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package runflags renders a run's invocation back to the command line that builds the same run: the inverse of runplan. The desktop app uses it to copy a run as a `sonde` command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args

func Args(inv *runplan.Invocation) []string

Args returns the arguments of `sonde` (without the program name) that build the same run as inv: the subcommand ("run", or "test"), the flags, then the files. A flag is rendered when it was given (Set) or, for a flag whose value applies whether or not it was given, when its value is set; a list flag once per element. Values are raw: secrets included.

func Names

func Names() []string

Names returns the long name of every flag Args renders.

func Shell

func Shell(inv *runplan.Invocation, dialect Dialect, reveal bool) (string, error)

Shell renders inv as a `sonde` command line for dialect. Unless reveal is set, credentials are references to environment variables, and a first comment line names the variables to set: the value of every --secret (SECRET_<name>), the password of --user, --cert and a --proxy URL, and the value of an Authorization, Proxy-Authorization or Cookie --header. A value cmd.exe can not quote (a line break, `%` or `!`) is an error for that dialect.

Types

type Dialect

type Dialect int

Dialect is a shell a command is written for.

const (
	POSIX      Dialect = iota // sh, bash, zsh
	PowerShell                // Windows PowerShell and pwsh
	Cmd                       // Windows cmd.exe
)

Dialects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL