MCPcopy Index your code
hub / github.com/box-cli-maker/box-cli-maker / buildPlainBar

Function buildPlainBar

util.go:106–110  ·  view source on GitHub ↗

buildPlainBar builds a horizontal bar (without title) that matches the specified visual line width.

(left, fill, right string, leftW, rightW, lineWidth, horizontalWidth int)

Source from the content-addressed store, hash-verified

104// buildPlainBar builds a horizontal bar (without title) that matches the
105// specified visual line width.
106func buildPlainBar(left, fill, right string, leftW, rightW, lineWidth, horizontalWidth int) string {
107 inner := max(lineWidth-leftW-rightW, 0)
108 bar := buildSegment(fill, inner, horizontalWidth)
109 return left + bar + right
110}
111
112// buildTitledBar builds a top or bottom bar containing a title. It left-aligns
113// the title segment and fills the remaining space on the right with the

Callers 3

TestBuildPlainBarFunction · 0.85
RenderMethod · 0.85
buildTitledBarFunction · 0.85

Calls 1

buildSegmentFunction · 0.85

Tested by 1

TestBuildPlainBarFunction · 0.68