cli

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 43 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli wires flate's command-line interface using cobra.

Every multi-kind command takes the same ks/hr/all positional layout:

  • get ks|hr|images|all — list Flux objects or images.
  • build ks|hr|all — render Flux objects to YAML.
  • diff ks|hr|images|all — compare current vs. another path.
  • test ks|hr|all — report reconcile status.

Use New() to obtain a cobra.Command for embedding flate in a parent CLI; Execute() and Run() are the entry points used by cmd/flate and by in-process E2E tests respectively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version string) int

Execute runs the root command against os.Args and returns the suggested process exit code. version is the build identifier surfaced via --version.

func New

func New(version string, cfg RunConfig) *cobra.Command

New snapshots invocation transports before command execution.

func Run

func Run(args []string, stdout, stderr io.Writer, cfg RunConfig) int

Run routes dependency logs through stderr and changes process logging state.

Types

type RunConfig added in v0.8.0

type RunConfig struct {
	GitTransports sourcegit.Transports
}

RunConfig supplies invocation transports without exposing command-line flags.

Directories

Path Synopsis
Package output owns serialization and terminal presentation of prepared values.
Package output owns serialization and terminal presentation of prepared values.
Package testrunner classifies completed reconcile results for flate test.
Package testrunner classifies completed reconcile results for flate test.

Jump to

Keyboard shortcuts

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