MCPcopy Index your code
hub / github.com/kopia/kopia / compressSpaces

Function compressSpaces

cli/command_policy_set_logging_test.go:71–83  ·  view source on GitHub ↗
(lines []string)

Source from the content-addressed store, hash-verified

69}
70
71func compressSpaces(lines []string) []string {
72 var result []string
73
74 for _, l := range lines {
75 for l2 := strings.ReplaceAll(l, " ", " "); l != l2; l2 = strings.ReplaceAll(l, " ", " ") {
76 l = l2
77 }
78
79 result = append(result, l)
80 }
81
82 return result
83}

Callers 4

TestSetSplitterPolicyFunction · 0.85
TestSetUploadPolicyFunction · 0.85
TestSetLoggingPolicyFunction · 0.85
TestSetOSSnapshotPolicyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected