cmd

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 45 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

func FormatTimeAgo(t time.Time) string

FormatTimeAgo formats a time as "X ago" string

func GenerateInstanceName

func GenerateInstanceName(image string) string

GenerateInstanceName generates a name from image reference

func ResolveInstance

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

func TruncateID(id string) string

TruncateID truncates an ID to 12 characters (like Docker)

func TruncateString

func TruncateString(s string, max int) string

TruncateString truncates a string to max length with ellipsis

Types

type BodyContentType

type BodyContentType int
const (
	MultipartFormEncoded BodyContentType = iota
	ApplicationJSON
)

type ExecExitError

type ExecExitError struct {
	Code int
}

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

func (*ExecExitError) Error

func (e *ExecExitError) Error() string

type TableWriter

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

TableWriter provides simple table formatting for CLI output

func NewTableWriter

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

NewTableWriter creates a new table writer

func (*TableWriter) AddRow

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

AddRow adds a row to the table

func (*TableWriter) Render

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