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

Function joinColumns

core/cmd/server/cmd/user.go:145–154  ·  view source on GitHub ↗
(values []string, widths []int)

Source from the content-addressed store, hash-verified

143}
144
145func joinColumns(values []string, widths []int) string {
146 out := ""
147 for i, value := range values {
148 out += padDisplayWidth(value, widths[i])
149 if i != len(values)-1 {
150 out += " "
151 }
152 }
153 return out
154}
155
156func padDisplayWidth(value string, width int) string {
157 pad := width - displayWidth(value)

Callers 1

printUserRowsFunction · 0.85

Calls 1

padDisplayWidthFunction · 0.85

Tested by

no test coverage detected