cli

package
v0.0.11-beta Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package cli implements the command structure and execution for the tool. It defines the root command, subcommands, and handles loading embedded configuration files required for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// Command is the root cobra.Command instance
	Command *cobra.Command
	// Config contains application configuration
	Config *config.Config
	// Files contains the embedded configuration files and templates
	Files config.Embedded
}

Command encapsulates a root cobra command with its associated config and embedded files.

func NewCommand

func NewCommand(cfg *config.Config, version string, embeds embed.FS) (*Command, error)

NewCommand creates a fully configured Command instance with embedded files and subcommands.

func NewRootCommand

func NewRootCommand(cfg *config.Config, files config.Embedded, version string) *Command

NewRootCommand creates the root cobra command with configuration and embedded files.

func (*Command) Flags

func (cmd *Command) Flags()

Flags adds all root-level flags to the command.

func (*Command) Run

func (cmd *Command) Run() error

Run executes the root command.

func (*Command) Subcommands

func (cmd *Command) Subcommands()

Subcommands adds all subcommands to the root command.

Directories

Path Synopsis
Package download implements the download command for godyl.
Package download implements the download command for godyl.
Package dump provides command implementations for displaying various configuration and system information.
Package dump provides command implementations for displaying various configuration and system information.
configuration
Package configuration implements the config dump subcommand for godyl.
Package configuration implements the config dump subcommand for godyl.
defaults
Package defaults implements the defaults dump subcommand for godyl.
Package defaults implements the defaults dump subcommand for godyl.
env
Package env implements the env dump subcommand for godyl.
Package env implements the env dump subcommand for godyl.
platform
Package platform implements the platform dump subcommand for godyl.
Package platform implements the platform dump subcommand for godyl.
tools
Package tools implements the tools dump subcommand for godyl.
Package tools implements the tools dump subcommand for godyl.
Package flags manages command-line flag binding and configuration for godyl.
Package flags manages command-line flag binding and configuration for godyl.
Package install implements the install command for godyl.
Package install implements the install command for godyl.
Package update implements the update command for godyl.
Package update implements the update command for godyl.
Package version provides the subcommand for printing the tool version.
Package version provides the subcommand for printing the tool version.

Jump to

Keyboard shortcuts

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