printAmbiguousHint prints an informational warning if the provided filter argument is ambiguous. The "docker images" top-level subcommand predates the "docker " convention (e.g. "docker image ls"), but accepts a positional argument to search/filter images by name (globbing). It's com
(stdErr io.Writer, matchName string)
| 195 | // Disallowing these search-terms would be a breaking change, but we can print |
| 196 | // and informational message to help the users correct their mistake. |
| 197 | func printAmbiguousHint(stdErr io.Writer, matchName string) { |
| 198 | switch matchName { |
| 199 | // List of subcommands for "docker image" and their aliases (see "docker image --help"): |
| 200 | case "build", |
| 201 | "history", |
| 202 | "import", |
| 203 | "inspect", |
| 204 | "list", |
| 205 | "load", |
| 206 | "ls", |
| 207 | "prune", |
| 208 | "pull", |
| 209 | "push", |
| 210 | "rm", |
| 211 | "save", |
| 212 | "tag": |
| 213 | |
| 214 | _, _ = fmt.Fprintf(stdErr, "No images found matching %q: did you mean \"docker image %[1]s\"?\n", matchName) |
| 215 | } |
| 216 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…