Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LineTreeFormat = TreeFormat{
MiddleDrop: "├── ",
LastDrop: "└── ",
SkipLine: "│ ",
Spacer: " ",
}
LineTreeFormat uses line drawing characters to format a tree
TreeRoot ├── First child # MiddleDrop = "├── " │ Skipped line # SkipLine = "│ " └── Last child # LastDrop = "└── " ....└── Only child # Spacer="....", LastDrop = "└── "
Functions ¶
func Verbose ¶
func Verbose(p *ImageTreePrinter)
Types ¶
type ImageTreePrinter ¶
type ImageTreePrinter struct {
// contains filtered or unexported fields
}
func NewImageTreePrinter ¶
func NewImageTreePrinter(opts ...PrintOpt) *ImageTreePrinter
func (*ImageTreePrinter) PrintImageTree ¶
func (p *ImageTreePrinter) PrintImageTree(ctx context.Context, img images.Image, store content.InfoReaderProvider) error
PrintImageTree prints an image and all its sub elements
func (*ImageTreePrinter) PrintManifestTree ¶
func (p *ImageTreePrinter) PrintManifestTree(ctx context.Context, desc ocispec.Descriptor, store content.InfoReaderProvider) error
PrintManifestTree prints a manifest and all its sub elements
type PrintOpt ¶
type PrintOpt func(*ImageTreePrinter)
func WithFormat ¶
func WithFormat(format TreeFormat) PrintOpt
func WithWriter ¶
type TreeFormat ¶
TreeFormat is used to format tree based output using 4 values. Each value must display with the same total width to format correctly.
MiddleDrop is used to show a child element which is not the last child LastDrop is used to show the last child element SkipLine is used for displaying data from a previous child before the next child Spacer is used to display child data for the last child