MCPcopy Index your code
hub / github.com/docker/cli / removeNetworks

Function removeNetworks

cli/command/stack/remove.go:118–128  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, networks []network.Summary)

Source from the content-addressed store, hash-verified

116}
117
118func 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
130func removeSecrets(ctx context.Context, dockerCli command.Cli, secrets []swarm.Secret) bool {
131 var hasError bool

Callers 1

runRemoveFunction · 0.85

Calls 4

OutMethod · 0.65
ClientMethod · 0.65
ErrMethod · 0.65
NetworkRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…