File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "context"
55 "fmt"
66 "os"
7+ "slices"
78 "strings"
89 "wireport/cmd/server/config"
910 "wireport/internal/logger"
@@ -157,11 +158,11 @@ func EnsureDockerNetworkIsAttachedToAllContainers() error {
157158 }
158159
159160 for _ , container := range containers {
160- // Skip wireport-gateway container (should not be connected to the network )
161- for _ , name := range container . Names {
162- if name == fmt . Sprintf ( "/%s" , config . Config . WireportGatewayContainerName ) {
163- continue
164- }
161+ isGateway := slices . Contains ( container . Names , fmt . Sprintf ( "/%s" , config . Config . WireportGatewayContainerName ) )
162+
163+ if isGateway {
164+ // Skip wireport-gateway container (should not be connected to the network)
165+ continue
165166 }
166167
167168 // Skip containers that are already connected to the target network to avoid conflicts
You can’t perform that action at this time.
0 commit comments