(ctx context.Context, dockerCLI command.Cli, networks []network.Summary)
| 116 | } |
| 117 | |
| 118 | func removeNetworks(ctx context.Context, dockerCLI command.Cli, networks []network.Summary) bool { |
| 119 | var hasError bool |
| 120 | for _, nw := range networks { |
| 121 | _, _ = fmt.Fprintln(dockerCLI.Out(), "Removing network", nw.Name) |
| 122 | if _, err := dockerCLI.Client().NetworkRemove(ctx, nw.ID, client.NetworkRemoveOptions{}); err != nil { |
| 123 | hasError = true |
| 124 | _, _ = fmt.Fprintf(dockerCLI.Err(), "Failed to remove network %s: %s", nw.ID, err) |
| 125 | } |
| 126 | } |
| 127 | return hasError |
| 128 | } |
| 129 | |
| 130 | func removeSecrets(ctx context.Context, dockerCli command.Cli, secrets []swarm.Secret) bool { |
| 131 | var hasError bool |
no test coverage detected
searching dependent graphs…