MCPcopy
hub / github.com/google/seesaw / label

Function label

cli/show.go:555–562  ·  view source on GitHub ↗

label returns a string containing the label with indentation and padding.

(l string, indent, width int)

Source from the content-addressed store, hash-verified

553
554// label returns a string containing the label with indentation and padding.
555func label(l string, indent, width int) string {
556 pad := width - indent - len(l)
557 if pad < 0 {
558 pad = 0
559 }
560 return fmt.Sprintf("%s%s%s", strings.Repeat(" ", indent), l,
561 strings.Repeat(" ", pad))
562}
563
564// printHdr prints a given header label.
565func printHdr(h string, args ...interface{}) {

Callers 3

configStatusFunction · 0.85
printVserverFunction · 0.85
printFmtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected