MCPcopy Index your code
hub / github.com/ddev/ddev / ArrayToReadableOutput

Function ArrayToReadableOutput

pkg/util/utils.go:410–420  ·  view source on GitHub ↗

ArrayToReadableOutput generates a printable list of items in a readable way

(slice []string)

Source from the content-addressed store, hash-verified

408
409// ArrayToReadableOutput generates a printable list of items in a readable way
410func ArrayToReadableOutput(slice []string) (string, error) {
411 if len(slice) == 0 {
412 return "", fmt.Errorf("empty slice")
413 }
414 var b strings.Builder
415 b.WriteString("\n")
416 for _, item := range slice {
417 b.WriteString(" - " + item + "\n")
418 }
419 return b.String(), nil
420}
421
422// WindowsPathToCygwinPath changes C:/path/to/something to //c/path/to/something
423// This should only be used in CYGWIN/git-bash context

Callers 4

clean.goFile · 0.92
addCustomCommandsFromDirFunction · 0.92

Calls 1

ErrorfMethod · 0.80

Tested by 1