cmd

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.7.0" // x-release-please-version

Variables

View Source
var (
	Command       *cli.Command
	OutputFormats = []string{"auto", "explore", "json", "jsonl", "pretty", "raw", "yaml"}
)

Functions

func FormatTimeAgo added in v0.5.0

func FormatTimeAgo(t time.Time) string

FormatTimeAgo formats a time as "X ago" string

func GenerateInstanceName added in v0.5.0

func GenerateInstanceName(image string) string

GenerateInstanceName generates a name from image reference

func ResolveInstance added in v0.5.0

func ResolveInstance(ctx context.Context, client *hypeman.Client, identifier string) (string, error)

ResolveInstance resolves an instance identifier to a full instance ID. It supports: - Full instance ID (exact match) - Partial instance ID (prefix match) - Instance name (exact match) Returns an error if the identifier is ambiguous or not found.

func ShowJSON

func ShowJSON(out *os.File, title string, res gjson.Result, format string, transform string) error

func TruncateID added in v0.5.0

func TruncateID(id string) string

TruncateID truncates an ID to 12 characters (like Docker)

func TruncateString added in v0.5.0

func TruncateString(s string, max int) string

TruncateString truncates a string to max length with ellipsis

Types

type BodyContentType added in v0.5.1

type BodyContentType int
const (
	MultipartFormEncoded BodyContentType = iota
	ApplicationJSON
)

type ExecExitError added in v0.5.0

type ExecExitError struct {
	Code int
}

ExecExitError is returned when exec completes with a non-zero exit code

func (*ExecExitError) Error added in v0.5.0

func (e *ExecExitError) Error() string

type TableWriter added in v0.5.0

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

TableWriter provides simple table formatting for CLI output

func NewTableWriter added in v0.5.0

func NewTableWriter(w io.Writer, headers ...string) *TableWriter

NewTableWriter creates a new table writer

func (*TableWriter) AddRow added in v0.5.0

func (t *TableWriter) AddRow(cells ...string)

AddRow adds a row to the table

func (*TableWriter) Render added in v0.5.0

func (t *TableWriter) Render()

Render outputs the table

Jump to

Keyboard shortcuts

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