MCPcopy
hub / github.com/spf13/cobra / rpad

Function rpad

cobra.go:174–177  ·  view source on GitHub ↗

rpad adds padding to the right of a string.

(s string, padding int)

Source from the content-addressed store, hash-verified

172
173// rpad adds padding to the right of a string.
174func rpad(s string, padding int) string {
175 formattedString := fmt.Sprintf("%%-%ds", padding)
176 return fmt.Sprintf(formattedString, s)
177}
178
179func tmpl(text string) *tmplFunc {
180 return &tmplFunc{

Callers 2

TestRpadFunction · 0.85
defaultUsageFuncFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRpadFunction · 0.68