Documentation
¶
Overview ¶
Package sf implements the command tree used when the force binary is invoked under the name sf. Commands accept the names and flags of the Salesforce sf CLI and print output in its format.
Index ¶
Constants ¶
const CompatVersion = "2.138.6"
CompatVersion is the sf release whose commands, flags and output this package reproduces.
const ModeFlag = "--sf"
ModeFlag is the force flag that selects sf-compatible mode.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute runs the sf command tree with the process arguments and exits.
func InvokedAsSf ¶
InvokedAsSf reports whether argv0 names the binary sf.
func NewRootCmd ¶
NewRootCmd builds a new sf command tree. Each call returns independent commands and flag values.
func SetInvocation ¶
SetInvocation records how sf-compatible mode was started: argv0 as it was typed, such as "sf", "/tmp/sf" or "./force", followed by the mode flag when the mode was selected with it. A name that cannot be written in a message without quoting, and the temporary binary of "go run", are replaced by "sf", or by "force" with the flag.
func StripModeFlag ¶
StripModeFlag reports whether args contain --sf and returns args without it. An argument after "--" is not a flag. "force --sf org list" and "force org list --sf" both run "sf org list".
Types ¶
type Error ¶
type Error struct {
Name string
Message string
ExitCode int
Actions []string
// Label replaces Name in the human "Error (<label>):" line and in the
// "code" field of the JSON envelope. sf prints the exit code there
// for some errors that have a name.
Label string
// Data is written as the "data" field of the JSON envelope.
Data interface{}
// Compact prints one blank line after the message instead of two, as
// the sf plugins that are installed on first use do.
Compact bool
}
Error is an error reported in sf's format. Name is the error name sf prints, such as NoDefaultEnvError.
Source Files
¶
- alias.go
- aliases.go
- apex.go
- apextest.go
- api.go
- apirest.go
- bulk.go
- bulk_legacy.go
- cmdt.go
- cmdt_fromorg.go
- color.go
- commands.go
- community.go
- config.go
- data.go
- dataquery.go
- datatree.go
- deploy_reports.go
- ejs.go
- errors.go
- flagaliases.go
- forceignore.go
- gitstore.go
- jsoncolor.go
- login.go
- ordered.go
- org.go
- org_components.go
- org_create_user.go
- org_info.go
- org_open_private.go
- org_users.go
- output.go
- package.go
- package1_create.go
- package_ancestry.go
- package_convert.go
- package_dependencies.go
- package_more.go
- package_push.go
- package_push_schedule.go
- package_retrieve.go
- package_version_deps.go
- package_version_report.go
- package_version_wait.go
- plugin_data.go
- project.go
- project_delete.go
- project_deploy.go
- project_files.go
- registry_data.go
- root.go
- sandbox.go
- sandbox_delete.go
- schema.go
- scratch.go
- shape.go
- snapshot.go
- sobject.go
- target.go
- template.go
- template_more.go
- tracking.go
- tracking_preview.go
- tracking_sync.go
- version.go
- which.go