Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomTag ¶
func CustomTag(text string, foreground lipgloss.CompleteColor, background lipgloss.CompleteColor) string
CustomTag renders a tag with the given text, foreground, background and width e.g. CustomTag("hello", tui.Colors.White, tui.Colors.Purple, 8) Use Tag() for a standard tag.
func ErrorList ¶
func ErrorList(errs []error, opts ...ErrorListOption) string
ErrorList renders a list of errors as a dot point list
Types ¶
type ErrorListOption ¶
type ErrorListOption = func(*ErrorListOptions) *ErrorListOptions
func WithCustomHeading ¶
func WithCustomHeading(heading string) ErrorListOption
WithCustomHeading sets a custom heading for the error list
type ErrorListOptions ¶
type ErrorListOptions struct {
// contains filtered or unexported fields
}
func WithoutHeading ¶
func WithoutHeading(ol *ErrorListOptions) *ErrorListOptions
type StatusNode ¶
type StatusNode struct {
// contains filtered or unexported fields
}
StatusNode assists with rendering a tree of nodes, each with an optional status e.g. Api::main
├─aws:apigatewayv2/api:Api::main updated (3s) ├─aws:lambda/permission:Permission::maintwilight-sun_services- unchanged (0s) │ hello └─aws:apigatewayv2/stage:Stage::mainDefaultStage unchanged (0s)
KeyValueStore::cache
└─aws:dynamodb/table:Table::cache unchanged (0s)
func NewStatusNode ¶
func NewStatusNode(name string, status string) *StatusNode
func (*StatusNode) AddNode ¶
func (s *StatusNode) AddNode(name string, status string) *StatusNode
func (StatusNode) Children ¶
func (n StatusNode) Children() []*StatusNode
func (StatusNode) Name ¶
func (n StatusNode) Name() string
func (StatusNode) Render ¶
func (n StatusNode) Render(maxWidth int) string
Render this node as a tree maxNameWidth sets the maximum width of the names of nodes in the tree. the total width is maxNameWidth + 1 + maxStatusWidth
func (StatusNode) Status ¶
func (n StatusNode) Status() string
Click to show internal directories.
Click to hide internal directories.