MCPcopy Index your code
hub / github.com/coder/coder / pad

Function pad

cli/clitest/golden.go:303–311  ·  view source on GitHub ↗
(s string, n int)

Source from the content-addressed store, hash-verified

301}
302
303func pad(s string, n int) string {
304 if len(s) >= n {
305 return s
306 }
307 n -= len(s)
308 pre := n / 2
309 post := n - pre
310 return strings.Repeat("=", pre) + s + strings.Repeat("=", post)
311}

Callers 2

normalizeGoldenFileFunction · 0.70
prepareTestDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected