mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
update c/{common,image,storage} to latest
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
9
vendor/github.com/containers/common/libnetwork/types/define.go
generated
vendored
9
vendor/github.com/containers/common/libnetwork/types/define.go
generated
vendored
@@ -3,7 +3,8 @@ package types
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"github.com/containers/storage/pkg/regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -19,7 +20,11 @@ var (
|
||||
|
||||
// NameRegex is a regular expression to validate names.
|
||||
// This must NOT be changed.
|
||||
NameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
|
||||
NameRegex = regexp.Delayed("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
|
||||
// RegexError is thrown in presence of an invalid name.
|
||||
RegexError = fmt.Errorf("names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: %w", ErrInvalidArg) // nolint:revive // This lint is new and we do not want to break the API.
|
||||
|
||||
// NotHexRegex is a regular expression to check if a string is
|
||||
// a hexadecimal string.
|
||||
NotHexRegex = regexp.Delayed(`[^0-9a-fA-F]`)
|
||||
)
|
||||
|
||||
2
vendor/github.com/containers/common/libnetwork/util/filters.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/util/filters.go
generated
vendored
@@ -38,7 +38,7 @@ func createFilterFuncs(key string, filterValues []string) (types.FilterFunc, err
|
||||
case "id":
|
||||
// matches part of one id
|
||||
return func(net types.Network) bool {
|
||||
return util.StringMatchRegexSlice(net.ID, filterValues)
|
||||
return util.FilterID(net.ID, filterValues)
|
||||
}, nil
|
||||
|
||||
// TODO: add dns enabled, internal filter
|
||||
|
||||
Reference in New Issue
Block a user