Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedFormat = errors.New("unsupported output format")
Functions ¶
func BufferString ¶
func BufferString(ctx context.Context, streams iostreams.IOStreams, b *spec.UDSBundle) *bytes.Buffer
BufferString returns a human-readable summary of the bundle as a buffer. Packages are displayed in deployment order (topological sort) when the dependency graph can be built. Falls back to declaration order on error.
Types ¶
type Format ¶
type Format string
Format represents an output format.
func ParseFormat ¶
ParseFormat converts a string to a Format, returning an error for unknown values.
type ResourcePrinter ¶
ResourcePrinter formats a result object.
func NewPrinter ¶
func NewPrinter(format Format) (ResourcePrinter, error)
NewPrinter returns a ResourcePrinter for the given format.
type TextPrinter ¶
type TextPrinter struct{}
TextPrinter formats result objects as human-readable text using reflection and `text` struct tags for field labels.
Supported field types: string, int, bool, float, struct, and slices of these. Unsupported types (map, chan, func, interface) are silently skipped.