( ctx context.Context, nwName string, containers Containers, )
| 1507 | } |
| 1508 | |
| 1509 | func (s *composeService) disconnectNetwork( |
| 1510 | ctx context.Context, |
| 1511 | nwName string, |
| 1512 | containers Containers, |
| 1513 | ) error { |
| 1514 | for _, c := range containers { |
| 1515 | _, err := s.apiClient().NetworkDisconnect(ctx, nwName, client.NetworkDisconnectOptions{ |
| 1516 | Container: c.ID, |
| 1517 | Force: true, |
| 1518 | }) |
| 1519 | if err != nil { |
| 1520 | return err |
| 1521 | } |
| 1522 | } |
| 1523 | |
| 1524 | return nil |
| 1525 | } |
| 1526 | |
| 1527 | func (s *composeService) connectNetwork( |
| 1528 | ctx context.Context, |
no test coverage detected