mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Compile regex on demand not in init
Every podman command is paying the price for this compile even when they don't use the Regex, this will speed up start of podman by a little. [NO NEW TESTS NEEDED] Existing tests should catch issues. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -3,7 +3,6 @@ package define
|
||||
import (
|
||||
"bufio"
|
||||
"io"
|
||||
"regexp"
|
||||
|
||||
"github.com/containers/common/libnetwork/types"
|
||||
)
|
||||
@ -20,8 +19,6 @@ var (
|
||||
NameRegex = types.NameRegex
|
||||
// RegexError is thrown in presence of an invalid container/pod name.
|
||||
RegexError = types.RegexError
|
||||
// UmaskRegex is a regular expression to validate Umask.
|
||||
UmaskRegex = regexp.MustCompile(`^[0-7]{1,4}$`)
|
||||
)
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user