update

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package update provides the update command implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUpdateOptions added in v0.0.6

func BuildUpdateOptions(provider, output string, dryRun, force, autoApprove, cleanup, reformat bool, sourcesDir string) []starmap.SyncOption

BuildUpdateOptions creates a slice of update options based on the provided flags.

func ConfirmChanges

func ConfirmChanges() (bool, error)

ConfirmChanges asks the user to confirm applying changes. Returns true if the user confirms, false if cancelled.

func ExecuteUpdate

func ExecuteUpdate(ctx context.Context, flags *Flags, globalFlags *globals.Flags) error

ExecuteUpdate orchestrates the complete update process.

func LoadCatalog

func LoadCatalog(inputPath string, isQuiet bool) (starmap.Starmap, error)

LoadCatalog creates a starmap instance with the appropriate catalog based on the input path. If inputPath is empty, uses the embedded catalog. Otherwise, loads from the specified directory.

func NewCommand

func NewCommand(globalFlags *globals.Flags) *cobra.Command

NewCommand creates the update command.

func ValidateForceUpdate

func ValidateForceUpdate(isQuiet, autoApprove bool) (bool, error)

ValidateForceUpdate shows a warning for force updates and asks for confirmation. Returns true if the user confirms to proceed, false if cancelled.

Types

type Flags added in v0.0.6

type Flags struct {
	Provider    string
	Source      string
	DryRun      bool
	Force       bool
	AutoApprove bool
	Output      string
	Input       string
	Cleanup     bool
	Reformat    bool
	SourcesDir  string
}

Flags holds flags for update command.

Jump to

Keyboard shortcuts

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