Documentation
¶
Overview ¶
Package cli implements the command-line interface for envprof.
Index ¶
- func Diff(options *Options) *cobra.Command
- func EnvProf(options *Options) (*envprof.EnvProf, error)
- func Exec(options *Options) *cobra.Command
- func Execute(version string) error
- func Export(options *Options) *cobra.Command
- func List(options *Options) *cobra.Command
- func LoadEnvProf(options *Options) (*envprof.EnvProf, error)
- func LoadPlan(options *Options) (profiles.Profiles, string, step.Steps, error)
- func LoadProfile(options *Options) (environment.Environment, error)
- func LoadProfiles(options *Options) (profiles.Profiles, error)
- func Merge(profile, environment env.Env, isolate, path bool, envs []string) env.Env
- func Path(options *Options) *cobra.Command
- func Profiles(options *Options) *cobra.Command
- func Shell(options *Options) *cobra.Command
- func UnknownSubcommandAction(cmd *cobra.Command, args []string) error
- func Write(options *Options) *cobra.Command
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶ added in v0.0.6
Exec returns the cobra command for executing a command with the active environment.
func LoadEnvProf ¶ added in v0.0.9
LoadEnvProf returns the loaded envprof instance.
func LoadProfile ¶ added in v0.0.9
func LoadProfile(options *Options) (environment.Environment, error)
LoadProfile returns the loaded and resolved profile.
func LoadProfiles ¶ added in v0.0.9
LoadProfiles returns the existing profiles.
func Path ¶ added in v0.0.9
Path returns the cobra command for displaying the path to the configuration file used.
func Shell ¶ added in v0.0.1
Shell returns the cobra command for entering a scoped shell with the active environment.
func UnknownSubcommandAction ¶ added in v0.0.8
UnknownSubcommandAction handles unknown cobra subcommands. Implements cobra.Command.RunE to provide helpful error messages and suggestions when an unknown subcommand is used. Required when TraverseChildren is true, as this disables cobra's built-in suggestion system. See: - https://github.com/spf13/cobra/issues/981 - https://github.com/containerd/nerdctl/blob/242e6fc6e861b61b878bd7df8bf25e95674c036d/cmd/nerdctl/main.go#L401-L418
Types ¶
type Options ¶ added in v0.0.8
type Options struct {
// EnvProf is the list of candidate profile files to load.
EnvProf []string
// Profile is the selected profile.
Profile string
// Verbose enables verbose output.
Verbose bool
// Overlay contains the profiles to overlay on top of the current profile.
Overlay []string
}
Options represents the root level configuration for the CLI application.