mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Update vendor of containers/(image, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
6
go.mod
6
go.mod
@ -11,10 +11,10 @@ require (
|
|||||||
github.com/container-orchestrated-devices/container-device-interface v0.5.3
|
github.com/container-orchestrated-devices/container-device-interface v0.5.3
|
||||||
github.com/containernetworking/cni v1.1.2
|
github.com/containernetworking/cni v1.1.2
|
||||||
github.com/containernetworking/plugins v1.1.1
|
github.com/containernetworking/plugins v1.1.1
|
||||||
github.com/containers/buildah v1.28.1-0.20221123095548-1c1fa111e4cc
|
github.com/containers/buildah v1.28.1-0.20221130132810-cf661299d14f
|
||||||
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290
|
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290
|
||||||
github.com/containers/conmon v2.0.20+incompatible
|
github.com/containers/conmon v2.0.20+incompatible
|
||||||
github.com/containers/image/v5 v5.23.1-0.20221124171848-19f10aac8007
|
github.com/containers/image/v5 v5.23.1-0.20221130170538-333c50e3eac8
|
||||||
github.com/containers/ocicrypt v1.1.6
|
github.com/containers/ocicrypt v1.1.6
|
||||||
github.com/containers/psgo v1.8.0
|
github.com/containers/psgo v1.8.0
|
||||||
github.com/containers/storage v1.44.1-0.20221121144727-71fd3e87df7a
|
github.com/containers/storage v1.44.1-0.20221121144727-71fd3e87df7a
|
||||||
@ -121,7 +121,7 @@ require (
|
|||||||
github.com/seccomp/libseccomp-golang v0.10.0 // indirect
|
github.com/seccomp/libseccomp-golang v0.10.0 // indirect
|
||||||
github.com/sigstore/sigstore v1.4.6 // indirect
|
github.com/sigstore/sigstore v1.4.6 // indirect
|
||||||
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 // indirect
|
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 // indirect
|
||||||
github.com/sylabs/sif/v2 v2.8.3 // indirect
|
github.com/sylabs/sif/v2 v2.9.0 // indirect
|
||||||
github.com/tchap/go-patricia v2.3.0+incompatible // indirect
|
github.com/tchap/go-patricia v2.3.0+incompatible // indirect
|
||||||
github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect
|
github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect
|
||||||
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
|
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
|
||||||
|
12
go.sum
12
go.sum
@ -262,14 +262,14 @@ github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHV
|
|||||||
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
|
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
|
||||||
github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE=
|
github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE=
|
||||||
github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8=
|
github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8=
|
||||||
github.com/containers/buildah v1.28.1-0.20221123095548-1c1fa111e4cc h1:PhYw1PLPiaApmKmjzX338u8iJRz2KGW1DyrvaPt7LVk=
|
github.com/containers/buildah v1.28.1-0.20221130132810-cf661299d14f h1:Nzbda2tG7/aimoKnDxysqFgS1Q/gSsbcn88lFPj9LwY=
|
||||||
github.com/containers/buildah v1.28.1-0.20221123095548-1c1fa111e4cc/go.mod h1:0HcSoS6BHXWzMKqtxY1L0gupebEX33oPC+X62lPi6+c=
|
github.com/containers/buildah v1.28.1-0.20221130132810-cf661299d14f/go.mod h1:0HcSoS6BHXWzMKqtxY1L0gupebEX33oPC+X62lPi6+c=
|
||||||
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290 h1:ds8YJg3Z91jOcqVR31aFFMH+BOobolXBeGktas58VgY=
|
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290 h1:ds8YJg3Z91jOcqVR31aFFMH+BOobolXBeGktas58VgY=
|
||||||
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290/go.mod h1:rzuZglPq/5sz6n29nhyDPCXh44CZymkCR2sacEZb7zw=
|
github.com/containers/common v0.50.2-0.20221128124429-24d78208a290/go.mod h1:rzuZglPq/5sz6n29nhyDPCXh44CZymkCR2sacEZb7zw=
|
||||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||||
github.com/containers/image/v5 v5.23.1-0.20221124171848-19f10aac8007 h1:UdyeWjzN5V4Gz5h5tX3l/whBHzrdvlPpZDKu4JobN68=
|
github.com/containers/image/v5 v5.23.1-0.20221130170538-333c50e3eac8 h1:GLTTwKYkNGDhG3HagLuPvhieu1JEjDs9RsCDr8oJr9s=
|
||||||
github.com/containers/image/v5 v5.23.1-0.20221124171848-19f10aac8007/go.mod h1:X3pdYvY0HVW9Re73Wa6YqZt3QyuZaCEUf/iDv/dvy1k=
|
github.com/containers/image/v5 v5.23.1-0.20221130170538-333c50e3eac8/go.mod h1:dXknI7O86/PznywqTwyHaCpuK1MBh1QYxLkSqyDswI0=
|
||||||
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a h1:spAGlqziZjCJL25C6F1zsQY05tfCKE9F5YwtEWWe6hU=
|
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a h1:spAGlqziZjCJL25C6F1zsQY05tfCKE9F5YwtEWWe6hU=
|
||||||
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
||||||
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
|
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
|
||||||
@ -908,8 +908,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
|||||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
github.com/sylabs/sif/v2 v2.8.3 h1:m5MwWhGOSdf+vuz/Riehbm2L3mcVn0716YduLicFbIE=
|
github.com/sylabs/sif/v2 v2.9.0 h1:q9K92j1QW4/QLOtKh9YZpJHrXav6x15AVhQGPVLcg+4=
|
||||||
github.com/sylabs/sif/v2 v2.8.3/go.mod h1:ZK1fytsX0alye/c4p7HEzVcsaKLitheoZgiIH/vCMTc=
|
github.com/sylabs/sif/v2 v2.9.0/go.mod h1:bRdFzcqif0eDjwx0isG4cgTFoKTQn/vfBXVSoP2rB2Y=
|
||||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
|
||||||
|
2
vendor/github.com/containers/buildah/define/types.go
generated
vendored
2
vendor/github.com/containers/buildah/define/types.go
generated
vendored
@ -30,7 +30,7 @@ const (
|
|||||||
Package = "buildah"
|
Package = "buildah"
|
||||||
// Version for the Package. Bump version in contrib/rpm/buildah.spec
|
// Version for the Package. Bump version in contrib/rpm/buildah.spec
|
||||||
// too.
|
// too.
|
||||||
Version = "1.28.1-dev"
|
Version = "1.29.0-dev"
|
||||||
|
|
||||||
// DefaultRuntime if containers.conf fails.
|
// DefaultRuntime if containers.conf fails.
|
||||||
DefaultRuntime = "runc"
|
DefaultRuntime = "runc"
|
||||||
|
149
vendor/github.com/containers/image/v5/docker/reference/regexp.go
generated
vendored
149
vendor/github.com/containers/image/v5/docker/reference/regexp.go
generated
vendored
@ -1,143 +1,160 @@
|
|||||||
package reference
|
package reference
|
||||||
|
|
||||||
import "regexp"
|
import (
|
||||||
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// alphaNumericRegexp defines the alpha numeric atom, typically a
|
// alphaNumeric defines the alpha numeric atom, typically a
|
||||||
// component of names. This only allows lower case characters and digits.
|
// component of names. This only allows lower case characters and digits.
|
||||||
alphaNumericRegexp = match(`[a-z0-9]+`)
|
alphaNumeric = `[a-z0-9]+`
|
||||||
|
|
||||||
// separatorRegexp defines the separators allowed to be embedded in name
|
// separator defines the separators allowed to be embedded in name
|
||||||
// components. This allow one period, one or two underscore and multiple
|
// components. This allow one period, one or two underscore and multiple
|
||||||
// dashes.
|
// dashes. Repeated dashes and underscores are intentionally treated
|
||||||
separatorRegexp = match(`(?:[._]|__|[-]*)`)
|
// differently. In order to support valid hostnames as name components,
|
||||||
|
// supporting repeated dash was added. Additionally double underscore is
|
||||||
|
// now allowed as a separator to loosen the restriction for previously
|
||||||
|
// supported names.
|
||||||
|
separator = `(?:[._]|__|[-]*)`
|
||||||
|
|
||||||
// nameComponentRegexp restricts registry path component names to start
|
|
||||||
// with at least one letter or number, with following parts able to be
|
|
||||||
// separated by one period, one or two underscore and multiple dashes.
|
|
||||||
nameComponentRegexp = expression(
|
|
||||||
alphaNumericRegexp,
|
|
||||||
optional(repeated(separatorRegexp, alphaNumericRegexp)))
|
|
||||||
|
|
||||||
// domainComponentRegexp restricts the registry domain component of a
|
|
||||||
// repository name to start with a component as defined by DomainRegexp
|
// repository name to start with a component as defined by DomainRegexp
|
||||||
// and followed by an optional port.
|
// and followed by an optional port.
|
||||||
domainComponentRegexp = match(`(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`)
|
domainComponent = `(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`
|
||||||
|
|
||||||
|
// The string counterpart for TagRegexp.
|
||||||
|
tag = `[\w][\w.-]{0,127}`
|
||||||
|
|
||||||
|
// The string counterpart for DigestRegexp.
|
||||||
|
digestPat = `[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`
|
||||||
|
|
||||||
|
// The string counterpart for IdentifierRegexp.
|
||||||
|
identifier = `([a-f0-9]{64})`
|
||||||
|
|
||||||
|
// The string counterpart for ShortIdentifierRegexp.
|
||||||
|
shortIdentifier = `([a-f0-9]{6,64})`
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// nameComponent restricts registry path component names to start
|
||||||
|
// with at least one letter or number, with following parts able to be
|
||||||
|
// separated by one period, one or two underscore and multiple dashes.
|
||||||
|
nameComponent = expression(
|
||||||
|
alphaNumeric,
|
||||||
|
optional(repeated(separator, alphaNumeric)))
|
||||||
|
|
||||||
|
domain = expression(
|
||||||
|
domainComponent,
|
||||||
|
optional(repeated(literal(`.`), domainComponent)),
|
||||||
|
optional(literal(`:`), `[0-9]+`))
|
||||||
// DomainRegexp defines the structure of potential domain components
|
// DomainRegexp defines the structure of potential domain components
|
||||||
// that may be part of image names. This is purposely a subset of what is
|
// that may be part of image names. This is purposely a subset of what is
|
||||||
// allowed by DNS to ensure backwards compatibility with Docker image
|
// allowed by DNS to ensure backwards compatibility with Docker image
|
||||||
// names.
|
// names.
|
||||||
DomainRegexp = expression(
|
DomainRegexp = re(domain)
|
||||||
domainComponentRegexp,
|
|
||||||
optional(repeated(literal(`.`), domainComponentRegexp)),
|
|
||||||
optional(literal(`:`), match(`[0-9]+`)))
|
|
||||||
|
|
||||||
// TagRegexp matches valid tag names. From docker/docker:graph/tags.go.
|
// TagRegexp matches valid tag names. From docker/docker:graph/tags.go.
|
||||||
TagRegexp = match(`[\w][\w.-]{0,127}`)
|
TagRegexp = re(tag)
|
||||||
|
|
||||||
|
anchoredTag = anchored(tag)
|
||||||
// anchoredTagRegexp matches valid tag names, anchored at the start and
|
// anchoredTagRegexp matches valid tag names, anchored at the start and
|
||||||
// end of the matched string.
|
// end of the matched string.
|
||||||
anchoredTagRegexp = anchored(TagRegexp)
|
anchoredTagRegexp = re(anchoredTag)
|
||||||
|
|
||||||
// DigestRegexp matches valid digests.
|
// DigestRegexp matches valid digests.
|
||||||
DigestRegexp = match(`[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`)
|
DigestRegexp = re(digestPat)
|
||||||
|
|
||||||
|
anchoredDigest = anchored(digestPat)
|
||||||
// anchoredDigestRegexp matches valid digests, anchored at the start and
|
// anchoredDigestRegexp matches valid digests, anchored at the start and
|
||||||
// end of the matched string.
|
// end of the matched string.
|
||||||
anchoredDigestRegexp = anchored(DigestRegexp)
|
anchoredDigestRegexp = re(anchoredDigest)
|
||||||
|
|
||||||
|
namePat = expression(
|
||||||
|
optional(domain, literal(`/`)),
|
||||||
|
nameComponent,
|
||||||
|
optional(repeated(literal(`/`), nameComponent)))
|
||||||
// NameRegexp is the format for the name component of references. The
|
// NameRegexp is the format for the name component of references. The
|
||||||
// regexp has capturing groups for the domain and name part omitting
|
// regexp has capturing groups for the domain and name part omitting
|
||||||
// the separating forward slash from either.
|
// the separating forward slash from either.
|
||||||
NameRegexp = expression(
|
NameRegexp = re(namePat)
|
||||||
optional(DomainRegexp, literal(`/`)),
|
|
||||||
nameComponentRegexp,
|
|
||||||
optional(repeated(literal(`/`), nameComponentRegexp)))
|
|
||||||
|
|
||||||
|
anchoredName = anchored(
|
||||||
|
optional(capture(domain), literal(`/`)),
|
||||||
|
capture(nameComponent,
|
||||||
|
optional(repeated(literal(`/`), nameComponent))))
|
||||||
// anchoredNameRegexp is used to parse a name value, capturing the
|
// anchoredNameRegexp is used to parse a name value, capturing the
|
||||||
// domain and trailing components.
|
// domain and trailing components.
|
||||||
anchoredNameRegexp = anchored(
|
anchoredNameRegexp = re(anchoredName)
|
||||||
optional(capture(DomainRegexp), literal(`/`)),
|
|
||||||
capture(nameComponentRegexp,
|
|
||||||
optional(repeated(literal(`/`), nameComponentRegexp))))
|
|
||||||
|
|
||||||
|
referencePat = anchored(capture(namePat),
|
||||||
|
optional(literal(":"), capture(tag)),
|
||||||
|
optional(literal("@"), capture(digestPat)))
|
||||||
// ReferenceRegexp is the full supported format of a reference. The regexp
|
// ReferenceRegexp is the full supported format of a reference. The regexp
|
||||||
// is anchored and has capturing groups for name, tag, and digest
|
// is anchored and has capturing groups for name, tag, and digest
|
||||||
// components.
|
// components.
|
||||||
ReferenceRegexp = anchored(capture(NameRegexp),
|
ReferenceRegexp = re(referencePat)
|
||||||
optional(literal(":"), capture(TagRegexp)),
|
|
||||||
optional(literal("@"), capture(DigestRegexp)))
|
|
||||||
|
|
||||||
// IdentifierRegexp is the format for string identifier used as a
|
// IdentifierRegexp is the format for string identifier used as a
|
||||||
// content addressable identifier using sha256. These identifiers
|
// content addressable identifier using sha256. These identifiers
|
||||||
// are like digests without the algorithm, since sha256 is used.
|
// are like digests without the algorithm, since sha256 is used.
|
||||||
IdentifierRegexp = match(`([a-f0-9]{64})`)
|
IdentifierRegexp = re(identifier)
|
||||||
|
|
||||||
// ShortIdentifierRegexp is the format used to represent a prefix
|
// ShortIdentifierRegexp is the format used to represent a prefix
|
||||||
// of an identifier. A prefix may be used to match a sha256 identifier
|
// of an identifier. A prefix may be used to match a sha256 identifier
|
||||||
// within a list of trusted identifiers.
|
// within a list of trusted identifiers.
|
||||||
ShortIdentifierRegexp = match(`([a-f0-9]{6,64})`)
|
ShortIdentifierRegexp = re(shortIdentifier)
|
||||||
|
|
||||||
|
anchoredIdentifier = anchored(identifier)
|
||||||
// anchoredIdentifierRegexp is used to check or match an
|
// anchoredIdentifierRegexp is used to check or match an
|
||||||
// identifier value, anchored at start and end of string.
|
// identifier value, anchored at start and end of string.
|
||||||
anchoredIdentifierRegexp = anchored(IdentifierRegexp)
|
anchoredIdentifierRegexp = re(anchoredIdentifier)
|
||||||
|
|
||||||
|
anchoredShortIdentifier = anchored(shortIdentifier)
|
||||||
// anchoredShortIdentifierRegexp is used to check if a value
|
// anchoredShortIdentifierRegexp is used to check if a value
|
||||||
// is a possible identifier prefix, anchored at start and end
|
// is a possible identifier prefix, anchored at start and end
|
||||||
// of string.
|
// of string.
|
||||||
anchoredShortIdentifierRegexp = anchored(ShortIdentifierRegexp)
|
anchoredShortIdentifierRegexp = re(anchoredShortIdentifier)
|
||||||
)
|
)
|
||||||
|
|
||||||
// match compiles the string to a regular expression.
|
// re compiles the string to a regular expression.
|
||||||
var match = regexp.MustCompile
|
var re = regexp.MustCompile
|
||||||
|
|
||||||
// literal compiles s into a literal regular expression, escaping any regexp
|
// literal compiles s into a literal regular expression, escaping any regexp
|
||||||
// reserved characters.
|
// reserved characters.
|
||||||
func literal(s string) *regexp.Regexp {
|
func literal(s string) string {
|
||||||
re := match(regexp.QuoteMeta(s))
|
return regexp.QuoteMeta(s)
|
||||||
|
|
||||||
if _, complete := re.LiteralPrefix(); !complete {
|
|
||||||
panic("must be a literal")
|
|
||||||
}
|
|
||||||
|
|
||||||
return re
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// expression defines a full expression, where each regular expression must
|
// expression defines a full expression, where each regular expression must
|
||||||
// follow the previous.
|
// follow the previous.
|
||||||
func expression(res ...*regexp.Regexp) *regexp.Regexp {
|
func expression(res ...string) string {
|
||||||
var s string
|
return strings.Join(res, "")
|
||||||
for _, re := range res {
|
|
||||||
s += re.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
return match(s)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional wraps the expression in a non-capturing group and makes the
|
// optional wraps the expression in a non-capturing group and makes the
|
||||||
// production optional.
|
// production optional.
|
||||||
func optional(res ...*regexp.Regexp) *regexp.Regexp {
|
func optional(res ...string) string {
|
||||||
return match(group(expression(res...)).String() + `?`)
|
return group(expression(res...)) + `?`
|
||||||
}
|
}
|
||||||
|
|
||||||
// repeated wraps the regexp in a non-capturing group to get one or more
|
// repeated wraps the regexp in a non-capturing group to get one or more
|
||||||
// matches.
|
// matches.
|
||||||
func repeated(res ...*regexp.Regexp) *regexp.Regexp {
|
func repeated(res ...string) string {
|
||||||
return match(group(expression(res...)).String() + `+`)
|
return group(expression(res...)) + `+`
|
||||||
}
|
}
|
||||||
|
|
||||||
// group wraps the regexp in a non-capturing group.
|
// group wraps the regexp in a non-capturing group.
|
||||||
func group(res ...*regexp.Regexp) *regexp.Regexp {
|
func group(res ...string) string {
|
||||||
return match(`(?:` + expression(res...).String() + `)`)
|
return `(?:` + expression(res...) + `)`
|
||||||
}
|
}
|
||||||
|
|
||||||
// capture wraps the expression in a capturing group.
|
// capture wraps the expression in a capturing group.
|
||||||
func capture(res ...*regexp.Regexp) *regexp.Regexp {
|
func capture(res ...string) string {
|
||||||
return match(`(` + expression(res...).String() + `)`)
|
return `(` + expression(res...) + `)`
|
||||||
}
|
}
|
||||||
|
|
||||||
// anchored anchors the regular expression by adding start and end delimiters.
|
// anchored anchors the regular expression by adding start and end delimiters.
|
||||||
func anchored(res ...*regexp.Regexp) *regexp.Regexp {
|
func anchored(res ...string) string {
|
||||||
return match(`^` + expression(res...).String() + `$`)
|
return `^` + expression(res...) + `$`
|
||||||
}
|
}
|
||||||
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
@ -95,7 +95,7 @@ github.com/containernetworking/cni/pkg/version
|
|||||||
# github.com/containernetworking/plugins v1.1.1
|
# github.com/containernetworking/plugins v1.1.1
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/containernetworking/plugins/pkg/ns
|
github.com/containernetworking/plugins/pkg/ns
|
||||||
# github.com/containers/buildah v1.28.1-0.20221123095548-1c1fa111e4cc
|
# github.com/containers/buildah v1.28.1-0.20221130132810-cf661299d14f
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/containers/buildah
|
github.com/containers/buildah
|
||||||
github.com/containers/buildah/bind
|
github.com/containers/buildah/bind
|
||||||
@ -172,7 +172,7 @@ github.com/containers/common/version
|
|||||||
# github.com/containers/conmon v2.0.20+incompatible
|
# github.com/containers/conmon v2.0.20+incompatible
|
||||||
## explicit
|
## explicit
|
||||||
github.com/containers/conmon/runner/config
|
github.com/containers/conmon/runner/config
|
||||||
# github.com/containers/image/v5 v5.23.1-0.20221124171848-19f10aac8007
|
# github.com/containers/image/v5 v5.23.1-0.20221130170538-333c50e3eac8
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/containers/image/v5/copy
|
github.com/containers/image/v5/copy
|
||||||
github.com/containers/image/v5/directory
|
github.com/containers/image/v5/directory
|
||||||
@ -695,7 +695,7 @@ github.com/stefanberger/go-pkcs11uri
|
|||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/stretchr/testify/assert
|
github.com/stretchr/testify/assert
|
||||||
github.com/stretchr/testify/require
|
github.com/stretchr/testify/require
|
||||||
# github.com/sylabs/sif/v2 v2.8.3
|
# github.com/sylabs/sif/v2 v2.9.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/sylabs/sif/v2/pkg/sif
|
github.com/sylabs/sif/v2/pkg/sif
|
||||||
# github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
|
# github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
|
||||||
|
Reference in New Issue
Block a user