(spec *oci.Spec, trunc, quote bool)
| 74 | } |
| 75 | |
| 76 | func InspectContainerCommand(spec *oci.Spec, trunc, quote bool) string { |
| 77 | if spec == nil || spec.Process == nil { |
| 78 | return "" |
| 79 | } |
| 80 | |
| 81 | command := spec.Process.CommandLine + strings.Join(spec.Process.Args, " ") |
| 82 | if trunc { |
| 83 | command = Ellipsis(command, 20) |
| 84 | } |
| 85 | if quote { |
| 86 | command = strconv.Quote(command) |
| 87 | } |
| 88 | return command |
| 89 | } |
| 90 | |
| 91 | func InspectContainerCommandTrunc(spec *oci.Spec) string { |
| 92 | return InspectContainerCommand(spec, true, true) |
no test coverage detected
searching dependent graphs…