Documentation
¶
Index ¶
- Constants
- Variables
- func FormatTimeAgo(t time.Time) string
- func GenerateInstanceName(image string) string
- func ResolveInstance(ctx context.Context, client *hypeman.Client, identifier string) (string, error)
- func ShowJSON(out *os.File, title string, res gjson.Result, format string, transform string) error
- func TruncateID(id string) string
- func TruncateString(s string, max int) string
- type BodyContentType
- type ExecExitError
- type TableWriter
Constants ¶
const Version = "0.7.0" // x-release-please-version
Variables ¶
var ( Command *cli.Command OutputFormats = []string{"auto", "explore", "json", "jsonl", "pretty", "raw", "yaml"} )
Functions ¶
func FormatTimeAgo ¶ added in v0.5.0
FormatTimeAgo formats a time as "X ago" string
func GenerateInstanceName ¶ added in v0.5.0
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 TruncateID ¶ added in v0.5.0
TruncateID truncates an ID to 12 characters (like Docker)
func TruncateString ¶ added in v0.5.0
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