MCPcopy
hub / github.com/cortesi/modd / niceHeader

Function niceHeader

proc.go:31–35  ·  view source on GitHub ↗

niceHeader tries to produce a nicer process name. We condense whitespace to make commands split over multiple lines with indentation more legible, and limit the line length to 80 characters.

(preamble string, command string)

Source from the content-addressed store, hash-verified

29// make commands split over multiple lines with indentation more legible, and
30// limit the line length to 80 characters.
31func niceHeader(preamble string, command string) string {
32 pre := termlog.DefaultPalette.Timestamp.SprintFunc()(preamble)
33 command = termlog.DefaultPalette.Header.SprintFunc()(shortCommand(command))
34 return pre + command
35}
36
37func logOutput(wg *sync.WaitGroup, fp io.ReadCloser, out func(string, ...interface{})) {
38 defer wg.Done()

Callers 2

NewDaemonPenFunction · 0.85
RunPrepsFunction · 0.85

Calls 1

shortCommandFunction · 0.85

Tested by

no test coverage detected