summaryrefslogtreecommitdiff
path: root/vendor/github.com/google/uuid/marshal.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/uuid/marshal.go')
-rw-r--r--vendor/github.com/google/uuid/marshal.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go
index 7f9e0c6c0..14bd34072 100644
--- a/vendor/github.com/google/uuid/marshal.go
+++ b/vendor/github.com/google/uuid/marshal.go
@@ -16,10 +16,11 @@ func (uuid UUID) MarshalText() ([]byte, error) {
// UnmarshalText implements encoding.TextUnmarshaler.
func (uuid *UUID) UnmarshalText(data []byte) error {
id, err := ParseBytes(data)
- if err == nil {
- *uuid = id
+ if err != nil {
+ return err
}
- return err
+ *uuid = id
+ return nil
}
// MarshalBinary implements encoding.BinaryMarshaler.