MCPcopy
hub / github.com/peak/s5cmd / cleanupError

Function cleanupError

command/error.go:90–96  ·  view source on GitHub ↗

cleanupError converts multiline messages into a single line.

(err error)

Source from the content-addressed store, hash-verified

88// cleanupError converts multiline messages into
89// a single line.
90func cleanupError(err error) string {
91 s := strings.Replace(err.Error(), "\n", " ", -1)
92 s = strings.Replace(s, "\t", " ", -1)
93 s = strings.Replace(s, " ", " ", -1)
94 s = strings.TrimSpace(s)
95 return s
96}

Callers 3

printDebugFunction · 0.85
printErrorFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected