mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
Fresh dep ensure
This commit is contained in:
10
vendor/github.com/pborman/uuid/marshal.go
generated
vendored
10
vendor/github.com/pborman/uuid/marshal.go
generated
vendored
@ -7,6 +7,8 @@ package uuid
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
)
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
@ -60,11 +62,11 @@ func (u Array) MarshalText() ([]byte, error) {
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (u *Array) UnmarshalText(data []byte) error {
|
||||
id := Parse(string(data))
|
||||
if id == nil {
|
||||
return errors.New("invalid UUID")
|
||||
id, err := guuid.ParseBytes(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*u = id.Array()
|
||||
*u = Array(id)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user