diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-04 15:16:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 15:16:41 +0100 |
commit | f261bfc54961c156c3a4acc2cd1c5379a83f1c0b (patch) | |
tree | 2fa2d225d5f51e35a401e2bb9e833e4e25341a6c /vendor/github.com/google | |
parent | 8e4d19da1547985c5f3aa01eae82db70644d15f1 (diff) | |
parent | b5e4ab0faa337919b38380c6255d96a9070eb7b5 (diff) | |
download | podman-f261bfc54961c156c3a4acc2cd1c5379a83f1c0b.tar.gz podman-f261bfc54961c156c3a4acc2cd1c5379a83f1c0b.tar.bz2 podman-f261bfc54961c156c3a4acc2cd1c5379a83f1c0b.zip |
Merge pull request #8859 from containers/dependabot/go_modules/github.com/google/uuid-1.1.3
Bump github.com/google/uuid from 1.1.2 to 1.1.3
Diffstat (limited to 'vendor/github.com/google')
-rw-r--r-- | vendor/github.com/google/uuid/uuid.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go index 524404cc5..daf3639c1 100644 --- a/vendor/github.com/google/uuid/uuid.go +++ b/vendor/github.com/google/uuid/uuid.go @@ -35,6 +35,12 @@ const ( var rander = rand.Reader // random function +type invalidLengthError struct{ len int } + +func (err *invalidLengthError) Error() string { + return fmt.Sprintf("invalid UUID length: %d", err.len) +} + // Parse decodes s into a UUID or returns an error. Both the standard UUID // forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the @@ -68,7 +74,7 @@ func Parse(s string) (UUID, error) { } return uuid, nil default: - return uuid, fmt.Errorf("invalid UUID length: %d", len(s)) + return uuid, &invalidLengthError{len(s)} } // s is now at least 36 bytes long // it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx @@ -112,7 +118,7 @@ func ParseBytes(b []byte) (UUID, error) { } return uuid, nil default: - return uuid, fmt.Errorf("invalid UUID length: %d", len(b)) + return uuid, &invalidLengthError{len(b)} } // s is now at least 36 bytes long // it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |