internal/testutils/networking: rm uses of lazyregexp

It's not needed for test-utilities.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-21 13:39:45 +02:00
parent daa991c3d8
commit b33b4bd290
2 changed files with 6 additions and 2 deletions

View File

@@ -3,10 +3,10 @@ package networking
import (
"fmt"
"os/exec"
"regexp"
"strings"
"testing"
"github.com/docker/docker/internal/lazyregexp"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/v3/assert"
"gotest.tools/v3/icmd"
@@ -21,7 +21,7 @@ const (
)
// Find the policy in, for example "Chain FORWARD (policy ACCEPT)".
var rePolicy = lazyregexp.New("policy ([A-Za-z]+)")
var rePolicy = regexp.MustCompile("policy ([A-Za-z]+)")
// SetFilterForwardPolicies sets the default policy for the FORWARD chain in
// the filter tables for both IPv4 and IPv6. The original policy is restored