mirror of
https://github.com/containers/skopeo.git
synced 2025-09-09 02:29:49 +00:00
fix(deps): update module github.com/containers/storage to v1.52.0
... and c/image/v5 to main Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
6baa928c1b
commit
58ff9fdb27
8
vendor/go.mongodb.org/mongo-driver/bson/primitive/objectid.go
generated
vendored
8
vendor/go.mongodb.org/mongo-driver/bson/primitive/objectid.go
generated
vendored
@@ -82,18 +82,18 @@ func ObjectIDFromHex(s string) (ObjectID, error) {
|
||||
return NilObjectID, ErrInvalidHex
|
||||
}
|
||||
|
||||
b, err := hex.DecodeString(s)
|
||||
var oid [12]byte
|
||||
_, err := hex.Decode(oid[:], []byte(s))
|
||||
if err != nil {
|
||||
return NilObjectID, err
|
||||
}
|
||||
|
||||
var oid [12]byte
|
||||
copy(oid[:], b)
|
||||
|
||||
return oid, nil
|
||||
}
|
||||
|
||||
// IsValidObjectID returns true if the provided hex string represents a valid ObjectID and false if not.
|
||||
//
|
||||
// Deprecated: Use ObjectIDFromHex and check the error instead.
|
||||
func IsValidObjectID(s string) bool {
|
||||
_, err := ObjectIDFromHex(s)
|
||||
return err == nil
|
||||
|
Reference in New Issue
Block a user