cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package cli implements the powercontext command tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorAlreadyReported

func ErrorAlreadyReported(err error) bool

ErrorAlreadyReported reports whether a command has already rendered the complete failure for the user. It is used by the process entrypoint only.

func ExitCode

func ExitCode(err error) int

ExitCode maps command errors to stable process exit statuses.

func New

func New(version VersionInfo) *cobra.Command

New constructs the complete local-server and remote-client command tree.

Types

type UsageError

type UsageError struct {
	// contains filtered or unexported fields
}

UsageError marks invalid command-line input. It is intentionally separate from Server and transport failures so the process can preserve the CLI's conventional exit status 2 without inspecting error text.

func (*UsageError) Error

func (e *UsageError) Error() string

func (*UsageError) Unwrap

func (e *UsageError) Unwrap() error

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
	Date    string
}

Jump to

Keyboard shortcuts

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