cli

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: AGPL-3.0 Imports: 41 Imported by: 0

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, images, or cluster summary.
  • 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) *cobra.Command

New constructs the root command and wires every subcommand into it. Callers that want full control over I/O streams should use Run. version is exposed via --version and the standard cobra template.

func Run

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

Run executes flate with the supplied argv and I/O streams, returning the exit code. Test-only — production callers go through Execute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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