MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / padDisplayWidth

Function padDisplayWidth

core/cmd/server/cmd/user.go:156–162  ·  view source on GitHub ↗
(value string, width int)

Source from the content-addressed store, hash-verified

154}
155
156func padDisplayWidth(value string, width int) string {
157 pad := width - displayWidth(value)
158 if pad <= 0 {
159 return value
160 }
161 return value + spaces(pad)
162}
163
164func spaces(n int) string {
165 if n <= 0 {

Callers 1

joinColumnsFunction · 0.85

Calls 2

displayWidthFunction · 0.85
spacesFunction · 0.85

Tested by

no test coverage detected