scafctl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Root

func Root(opts *RootOptions) *cobra.Command

Root creates and returns the root cobra.Command for the scafctl CLI tool. It sets up persistent flags, configures logging, handles profiler options, validates command arguments, and adds subcommands. The command provides configuration discovery and scaffolding functionality.

opts may be nil, in which case production defaults are used. Each invocation creates its own isolated state so multiple Root() calls can execute concurrently without data races.

Types

type RootOptions added in v0.3.0

type RootOptions struct {
	// IOStreams overrides the default os.Stdin/Stdout/Stderr streams.
	// When nil, standard OS streams are used.
	IOStreams *terminal.IOStreams

	// ExitFunc overrides os.Exit. When non-nil it is passed through
	// writer.WithExitFunc so that ErrorWithCode/ErrorWithExit call
	// this function instead of terminating the process. Useful for
	// in-process test execution where panicking or returning an error
	// is preferred over killing the process.
	ExitFunc func(code int)

	// ConfigPath overrides the --config flag default.
	ConfigPath string
}

RootOptions configures a Root() invocation. All fields are optional; nil values use production defaults. Passing a non-nil RootOptions enables fully parallel in-process execution because each call to Root() creates its own isolated state.

func NewRootOptions added in v0.3.0

func NewRootOptions() *RootOptions

NewRootOptions returns a RootOptions with production defaults (nil IOStreams, nil ExitFunc, empty ConfigPath).

Directories

Path Synopsis
Package auth provides CLI commands for authentication management.
Package auth provides CLI commands for authentication management.
Package build provides the build command for packaging artifacts into the local catalog.
Package build provides the build command for packaging artifacts into the local catalog.
Package bundle provides CLI commands for inspecting, verifying, and extracting solution bundles built by 'scafctl build solution'.
Package bundle provides CLI commands for inspecting, verifying, and extracting solution bundles built by 'scafctl build solution'.
Package cache provides commands for managing the scafctl cache.
Package cache provides commands for managing the scafctl cache.
Package catalog provides commands for inspecting and managing the local catalog.
Package catalog provides commands for inspecting and managing the local catalog.
Package config provides commands for managing scafctl configuration.
Package config provides commands for managing scafctl configuration.
Package eval provides commands for evaluating and validating CEL expressions and Go templates.
Package eval provides commands for evaluating and validating CEL expressions and Go templates.
Package examples provides commands for browsing and retrieving embedded scafctl examples.
Package examples provides commands for browsing and retrieving embedded scafctl examples.
Package explain provides the CLI explain commands.
Package explain provides the CLI explain commands.
get
Package lint provides the lint command for validating solutions.
Package lint provides the lint command for validating solutions.
Package newcmd provides commands for creating new scafctl resources.
Package newcmd provides commands for creating new scafctl resources.
Package plugins provides commands for managing scafctl plugins.
Package plugins provides commands for managing scafctl plugins.
Package run provides the CLI run commands.
Package run provides the CLI run commands.
Package secrets provides commands for managing scafctl secrets.
Package secrets provides commands for managing scafctl secrets.
Package vendor provides CLI commands for managing vendored solution dependencies.
Package vendor provides CLI commands for managing vendored solution dependencies.

Jump to

Keyboard shortcuts

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